client: open transient windows on the same screen

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-09-16 18:07:42 +02:00
parent 2be620618b
commit 6c8d2d1e8e
3 changed files with 8 additions and 5 deletions

View File

@ -404,6 +404,10 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen,
/* update hints */
property_update_wm_normal_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 */
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]);
}
/* 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 */
client_list_push(&globalconf.clients, c);
client_ref(&c);

View File

@ -49,7 +49,8 @@ property_update_wm_transient_for(client_t *c, xcb_get_property_reply_t *reply)
return;
}
client_setfloating(c, true);
c->type = WINDOW_TYPE_DIALOG;
c->transient_for = client_getbywin(trans);
}
static int

View File

@ -333,6 +333,8 @@ struct client_t
image_t *icon;
/** Size hints */
xcb_size_hints_t size_hints;
/** Window it is transient for */
client_t *transient_for;
/** Next and previous clients */
client_t *prev, *next;
};