diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-07-08 20:08:45 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-11-14 19:44:43 -0600 |
commit | e1f3983bf8a548f0357a92d9023c90aa4c273f64 (patch) | |
tree | be4f8fd93ac5a5f30013bc7cda1bd088652749ab /client.h | |
parent | 31bf1cbaf6418a6fb39e41b21cadc5c20826a663 (diff) |
use wlr_scene_subsurface_tree_set_clip
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4131
Closes: https://github.com/djpohly/dwl/issues/411
Diffstat (limited to 'client.h')
-rw-r--r-- | client.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -141,6 +141,28 @@ client_get_appid(Client *c) } static inline void +client_get_clip(Client *c, struct wlr_box *clip) +{ +#ifdef XWAYLAND + if (client_is_x11(c)) { + *clip = (struct wlr_box){ + .x = 0, + .y = 0, + .width = c->geom.width - c->bw, + .height = c->geom.height - c->bw}; + return; + } +#endif + + *clip = (struct wlr_box){ + .x = c->surface.xdg->pending.geometry.x, + .y = c->surface.xdg->pending.geometry.y, + .width = c->geom.width - c->bw, + .height = c->geom.height - c->bw}; + +} + +static inline void client_get_geometry(Client *c, struct wlr_box *geom) { #ifdef XWAYLAND |