mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-08 08:21:00 -04:00
fix border and surface position of gtk4 applications
This commit is contained in:
parent
88f241d1cf
commit
9413f04c2e
1 changed files with 11 additions and 2 deletions
13
dwl.c
13
dwl.c
|
|
@ -1692,8 +1692,13 @@ renderclients(Monitor *m, struct timespec *now)
|
||||||
wlr_output_layout_output_coords(output_layout, m->wlr_output, &ox, &oy);
|
wlr_output_layout_output_coords(output_layout, m->wlr_output, &ox, &oy);
|
||||||
|
|
||||||
if (c->bw) {
|
if (c->bw) {
|
||||||
w = surface->current.width;
|
if (wlr_surface_is_xdg_surface(surface)) {
|
||||||
h = surface->current.height;
|
w = c->surface.xdg->current.geometry.width;
|
||||||
|
h = c->surface.xdg->current.geometry.height;
|
||||||
|
} else {
|
||||||
|
w = surface->current.width;
|
||||||
|
h = surface->current.height;
|
||||||
|
}
|
||||||
borders = (struct wlr_box[4]) {
|
borders = (struct wlr_box[4]) {
|
||||||
{ox, oy, w + 2 * c->bw, c->bw}, /* top */
|
{ox, oy, w + 2 * c->bw, c->bw}, /* top */
|
||||||
{ox, oy + c->bw, c->bw, h}, /* left */
|
{ox, oy + c->bw, c->bw, h}, /* left */
|
||||||
|
|
@ -1715,6 +1720,10 @@ renderclients(Monitor *m, struct timespec *now)
|
||||||
rdata.when = now;
|
rdata.when = now;
|
||||||
rdata.x = c->geom.x + c->bw;
|
rdata.x = c->geom.x + c->bw;
|
||||||
rdata.y = c->geom.y + c->bw;
|
rdata.y = c->geom.y + c->bw;
|
||||||
|
if (wlr_surface_is_xdg_surface(surface)) {
|
||||||
|
rdata.x -= c->surface.xdg->current.geometry.x;
|
||||||
|
rdata.y -= c->surface.xdg->current.geometry.y;
|
||||||
|
}
|
||||||
client_for_each_surface(c, render, &rdata);
|
client_for_each_surface(c, render, &rdata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue