diff --git a/src/layout/canvas.h b/src/layout/canvas.h index ba1940e8..6dcd30eb 100644 --- a/src/layout/canvas.h +++ b/src/layout/canvas.h @@ -195,6 +195,12 @@ static void canvas_reposition(Monitor *m) { wlr_scene_node_set_position(&c->scene->node, new_x, new_y); +#ifdef XWAYLAND + if (client_is_x11(c)) + client_set_size(c, c->geom.width - 2 * c->bw, + c->geom.height - 2 * c->bw); +#endif + wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, NULL); client_apply_clip(c, 1.0); if (zoom != 1.0f && !c->is_clip_to_hide) diff --git a/src/mango.c b/src/mango.c index 8b111947..c8d7deaa 100644 --- a/src/mango.c +++ b/src/mango.c @@ -6965,6 +6965,8 @@ void unmapnotify(struct wl_listener *listener, void *data) { if (nextfocus) { focusclient(nextfocus, 0); + if (selmon && is_canvas_layout(selmon)) + canvas_pan_to_client(selmon, nextfocus); } if (!nextfocus && selmon->isoverview) { @@ -7552,6 +7554,12 @@ void xwaylandready(struct wl_listener *listener, void *data) { static void setgeometrynotify(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_geometry); + if (c->mon && is_canvas_layout(c->mon)) { + client_set_size(c, c->geom.width - 2 * c->bw, + c->geom.height - 2 * c->bw); + return; + } + wlr_scene_node_set_position(&c->scene->node, c->surface.xwayland->x, c->surface.xwayland->y); motionnotify(0, NULL, 0, 0, 0, 0);