client: open transient windows on the same screen
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
2be620618b
commit
6c8d2d1e8e
8
client.c
8
client.c
|
@ -404,6 +404,10 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen,
|
||||||
/* update hints */
|
/* update hints */
|
||||||
property_update_wm_normal_hints(c, NULL);
|
property_update_wm_normal_hints(c, NULL);
|
||||||
property_update_wm_hints(c, NULL);
|
property_update_wm_hints(c, NULL);
|
||||||
|
property_update_wm_transient_for(c, NULL);
|
||||||
|
|
||||||
|
if(c->transient_for)
|
||||||
|
screen = c->transient_for->screen;
|
||||||
|
|
||||||
/* Try to load props if any */
|
/* Try to load props if any */
|
||||||
client_loadprops(c, &globalconf.screens[screen]);
|
client_loadprops(c, &globalconf.screens[screen]);
|
||||||
|
@ -433,10 +437,6 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen,
|
||||||
tag_client(c, tags->tab[i]);
|
tag_client(c, tags->tab[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if it's a transient window, and manually set it floating. */
|
|
||||||
if(!client_isfloating(c))
|
|
||||||
property_update_wm_transient_for(c, NULL);
|
|
||||||
|
|
||||||
/* Push client in client list */
|
/* Push client in client list */
|
||||||
client_list_push(&globalconf.clients, c);
|
client_list_push(&globalconf.clients, c);
|
||||||
client_ref(&c);
|
client_ref(&c);
|
||||||
|
|
|
@ -49,7 +49,8 @@ property_update_wm_transient_for(client_t *c, xcb_get_property_reply_t *reply)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client_setfloating(c, true);
|
c->type = WINDOW_TYPE_DIALOG;
|
||||||
|
c->transient_for = client_getbywin(trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -333,6 +333,8 @@ struct client_t
|
||||||
image_t *icon;
|
image_t *icon;
|
||||||
/** Size hints */
|
/** Size hints */
|
||||||
xcb_size_hints_t size_hints;
|
xcb_size_hints_t size_hints;
|
||||||
|
/** Window it is transient for */
|
||||||
|
client_t *transient_for;
|
||||||
/** Next and previous clients */
|
/** Next and previous clients */
|
||||||
client_t *prev, *next;
|
client_t *prev, *next;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue