chase xdg_surface geometry changes (wlroots!4788)

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4788
This commit is contained in:
Leonardo Hernández Hernández 2024-08-14 13:37:14 -06:00
parent 0caa658276
commit 554754c9a2
No known key found for this signature in database
GPG Key ID: E538897EE11B9624

View File

@ -134,7 +134,6 @@ client_get_appid(Client *c)
static inline void static inline void
client_get_clip(Client *c, struct wlr_box *clip) client_get_clip(Client *c, struct wlr_box *clip)
{ {
struct wlr_box xdg_geom = {0};
*clip = (struct wlr_box){ *clip = (struct wlr_box){
.x = 0, .x = 0,
.y = 0, .y = 0,
@ -147,9 +146,8 @@ client_get_clip(Client *c, struct wlr_box *clip)
return; return;
#endif #endif
wlr_xdg_surface_get_geometry(c->surface.xdg, &xdg_geom); clip->x = c->surface.xdg->geometry.x;
clip->x = xdg_geom.x; clip->y = c->surface.xdg->geometry.y;
clip->y = xdg_geom.y;
} }
static inline void static inline void
@ -164,7 +162,7 @@ client_get_geometry(Client *c, struct wlr_box *geom)
return; return;
} }
#endif #endif
wlr_xdg_surface_get_geometry(c->surface.xdg, geom); *geom = c->surface.xdg->geometry;
} }
static inline Client * static inline Client *