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