scan: manage withdrawn windows on start

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-20 07:24:31 +02:00
parent cc79b387fc
commit 933e05f7b0
1 changed files with 7 additions and 3 deletions

View File

@ -75,6 +75,7 @@ scan(void)
xcb_get_window_attributes_reply_t *attr_r; xcb_get_window_attributes_reply_t *attr_r;
xcb_get_geometry_reply_t *geom_r; xcb_get_geometry_reply_t *geom_r;
xembed_info_t eminfo; xembed_info_t eminfo;
long state;
for(screen = 0; screen < screen_max; screen++) for(screen = 0; screen < screen_max; screen++)
{ {
@ -113,9 +114,12 @@ scan(void)
attr_wins[i], attr_wins[i],
NULL); NULL);
if(!attr_r || attr_r->override_redirect || state = window_getstate(wins[i]);
!(attr_r->map_state == XCB_MAP_STATE_VIEWABLE ||
window_getstate(wins[i]) == XCB_WM_ICONIC_STATE)) if(!attr_r || attr_r->override_redirect
|| !(attr_r->map_state == XCB_MAP_STATE_VIEWABLE
|| state == XCB_WM_ICONIC_STATE
|| state == XCB_WM_WITHDRAWN_STATE))
{ {
p_delete(&attr_r); p_delete(&attr_r);
continue; continue;