Merge branch 'djpohly:main' into bar_options

This commit is contained in:
A Frederick Christensen 2022-06-16 22:13:00 -05:00 committed by GitHub
commit bea7a3f87b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 10 deletions

View File

@ -231,6 +231,17 @@ client_min_size(Client *c, int *width, int *height)
*height = state->min_height;
}
static inline void
client_restack_surface(Client *c)
{
#ifdef XWAYLAND
if (client_is_x11(c))
wlr_xwayland_surface_restack(c->surface.xwayland, NULL,
XCB_STACK_MODE_ABOVE);
#endif
return;
}
static inline Client *
client_from_wlr_surface(struct wlr_surface *s)
{

12
dwl.c
View File

@ -1129,6 +1129,7 @@ focusclient(Client *c, int lift)
wl_list_insert(&fstack, &c->flink);
selmon = c->mon;
c->isurgent = 0;
client_restack_surface(c);
for (i = 0; i < 4; i++)
wlr_scene_rect_set_color(c->border[i], focuscolor);
@ -1152,7 +1153,7 @@ focusclient(Client *c, int lift)
return;
} else {
Client *w;
if (old->role_data && (w = client_from_wlr_surface(old)))
if ((w = client_from_wlr_surface(old)))
for (i = 0; i < 4; i++)
wlr_scene_rect_set_color(w->border[i], bordercolor);
@ -1169,15 +1170,6 @@ focusclient(Client *c, int lift)
return;
}
#ifdef XWAYLAND
/* This resolves an issue where the last spawned xwayland client
* receives all pointer activity.
*/
if (c->type == X11Managed)
wlr_xwayland_surface_restack(c->surface.xwayland, NULL,
XCB_STACK_MODE_ABOVE);
#endif
/* Have a client, so focus its top-level wlr_surface */
kb = wlr_seat_get_keyboard(seat);
if (kb)