mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-12-18 19:03:18 +00:00
add support for xwayland popups
they were already displaying but in a bad position and crashing, for example, when selecting an option in a menu in chromium or trying to move or resize popups
This commit is contained in:
parent
b7e5fcd48b
commit
0ee5512fa8
9
dwl.c
9
dwl.c
@ -1084,7 +1084,7 @@ focusclient(Client *c, int lift)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Put the new client atop the focus stack and select its monitor */
|
/* Put the new client atop the focus stack and select its monitor */
|
||||||
if (c) {
|
if (c && c->type != X11Unmanaged) {
|
||||||
wl_list_remove(&c->flink);
|
wl_list_remove(&c->flink);
|
||||||
wl_list_insert(&fstack, &c->flink);
|
wl_list_insert(&fstack, &c->flink);
|
||||||
selmon = c->mon;
|
selmon = c->mon;
|
||||||
@ -1108,7 +1108,8 @@ focusclient(Client *c, int lift)
|
|||||||
))
|
))
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
client_activate_surface(old, 0);
|
/* If client is unmanaged then we shoudn't deactivate old surface */
|
||||||
|
client_activate_surface(old, c && c->type == X11Unmanaged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1317,8 +1318,10 @@ mapnotify(struct wl_listener *listener, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (client_is_unmanaged(c)) {
|
if (client_is_unmanaged(c)) {
|
||||||
|
client_get_geometry(c, &c->geom);
|
||||||
/* Floating, no border */
|
/* Floating, no border */
|
||||||
wlr_scene_node_reparent(c->scene, layers[LyrFloat]);
|
wlr_scene_node_reparent(c->scene, layers[LyrFloat]);
|
||||||
|
wlr_scene_node_set_position(c->scene, c->geom.x, c->geom.y);
|
||||||
c->bw = 0;
|
c->bw = 0;
|
||||||
|
|
||||||
/* Insert this independent into independents lists. */
|
/* Insert this independent into independents lists. */
|
||||||
@ -1431,7 +1434,7 @@ moveresize(const Arg *arg)
|
|||||||
if (cursor_mode != CurNormal)
|
if (cursor_mode != CurNormal)
|
||||||
return;
|
return;
|
||||||
xytonode(cursor->x, cursor->y, NULL, &grabc, NULL, NULL, NULL);
|
xytonode(cursor->x, cursor->y, NULL, &grabc, NULL, NULL, NULL);
|
||||||
if (!grabc)
|
if (!grabc || grabc->type == X11Unmanaged)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Float the window and tell motionnotify to grab it */
|
/* Float the window and tell motionnotify to grab it */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user