mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-14 14:33:10 -04:00
opt: optimize unmanaged client init
This commit is contained in:
parent
b8fa9a3043
commit
36398a1af2
1 changed files with 9 additions and 13 deletions
22
src/mango.c
22
src/mango.c
|
|
@ -4473,28 +4473,24 @@ mapnotify(struct wl_listener *listener, void *data) {
|
|||
|
||||
/* Handle unmanaged clients first so we can return prior create borders
|
||||
*/
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_unmanaged(c)) {
|
||||
/* Unmanaged clients always are floating */
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c)) {
|
||||
fix_xwayland_coordinate(&c->geom);
|
||||
wlr_scene_node_set_position(&c->scene->node, c->geom.x, c->geom.y);
|
||||
wlr_xwayland_surface_configure(c->surface.xwayland, c->geom.x,
|
||||
c->geom.y, c->geom.width,
|
||||
c->geom.height);
|
||||
LISTEN(&c->surface.xwayland->events.set_geometry, &c->set_geometry,
|
||||
setgeometrynotify);
|
||||
}
|
||||
#endif
|
||||
wlr_scene_node_reparent(&c->scene->node, layers[LyrOverlay]);
|
||||
fix_xwayland_coordinate(&c->geom);
|
||||
wlr_scene_node_set_position(&c->scene->node, c->geom.x, c->geom.y);
|
||||
wlr_xwayland_surface_configure(c->surface.xwayland, c->geom.x,
|
||||
c->geom.y, c->geom.width,
|
||||
c->geom.height);
|
||||
LISTEN(&c->surface.xwayland->events.set_geometry, &c->set_geometry,
|
||||
setgeometrynotify);
|
||||
wlr_scene_node_reparent(&c->scene->node, layers[LyrOverlay]);
|
||||
if (client_wants_focus(c)) {
|
||||
focusclient(c, 1);
|
||||
exclusive_focus = c;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
// extra node
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue