mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-04 04:20:24 -04:00
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
This commit is contained in:
parent
31bf1cbaf6
commit
e1f3983bf8
2 changed files with 25 additions and 0 deletions
22
client.h
22
client.h
|
@ -140,6 +140,28 @@ client_get_appid(Client *c)
|
|||
return c->surface.xdg->toplevel->app_id;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue