correctly report position to xwayland clients
Previously we didn't take into account their borders requiring us to add `borderpx` to override_redirect clients. Fixes: https://codeberg.org/dwl/dwl/issues/651
This commit is contained in:
parent
4a7d1bebf5
commit
13925eb1da
2
client.h
2
client.h
|
@ -350,7 +350,7 @@ client_set_size(Client *c, uint32_t width, uint32_t height)
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c)) {
|
if (client_is_x11(c)) {
|
||||||
wlr_xwayland_surface_configure(c->surface.xwayland,
|
wlr_xwayland_surface_configure(c->surface.xwayland,
|
||||||
c->geom.x, c->geom.y, width, height);
|
c->geom.x + c->bw, c->geom.y + c->bw, width, height);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
5
dwl.c
5
dwl.c
|
@ -1651,8 +1651,7 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||||
if (client_is_unmanaged(c)) {
|
if (client_is_unmanaged(c)) {
|
||||||
/* Unmanaged clients always are floating */
|
/* Unmanaged clients always are floating */
|
||||||
wlr_scene_node_reparent(&c->scene->node, layers[LyrFloat]);
|
wlr_scene_node_reparent(&c->scene->node, layers[LyrFloat]);
|
||||||
wlr_scene_node_set_position(&c->scene->node, c->geom.x + borderpx,
|
wlr_scene_node_set_position(&c->scene->node, c->geom.x, c->geom.y);
|
||||||
c->geom.y + borderpx);
|
|
||||||
if (client_wants_focus(c)) {
|
if (client_wants_focus(c)) {
|
||||||
focusclient(c, 1);
|
focusclient(c, 1);
|
||||||
exclusive_focus = c;
|
exclusive_focus = c;
|
||||||
|
@ -3038,7 +3037,7 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
||||||
c = xsurface->data = ecalloc(1, sizeof(*c));
|
c = xsurface->data = ecalloc(1, sizeof(*c));
|
||||||
c->surface.xwayland = xsurface;
|
c->surface.xwayland = xsurface;
|
||||||
c->type = X11;
|
c->type = X11;
|
||||||
c->bw = borderpx;
|
c->bw = client_is_unmanaged(c) ? 0 : borderpx;
|
||||||
|
|
||||||
/* Listen to the various events it can emit */
|
/* Listen to the various events it can emit */
|
||||||
LISTEN(&xsurface->events.associate, &c->associate, associatex11);
|
LISTEN(&xsurface->events.associate, &c->associate, associatex11);
|
||||||
|
|
Loading…
Reference in a new issue