Fix x_get_transient_for_hint() based on XGetTransientForHint()

This commit is contained in:
Arnaud Fontaine 2008-03-22 15:16:51 +00:00 committed by Julien Danjou
parent 164e696005
commit abcb60b9ea
1 changed files with 7 additions and 1 deletions

View File

@ -129,8 +129,14 @@ x_get_transient_for_hint(xcb_connection_t *c, xcb_window_t win,
WINDOW, 0, 1), WINDOW, 0, 1),
NULL); NULL);
if(!r) if(!r || r->type != WINDOW || r->format != 32 || r->length == 0)
{
*prop_win = XCB_NONE;
if(r)
p_delete(&r);
return false; return false;
}
*prop_win = *((xcb_window_t *) xcb_get_property_value(r)); *prop_win = *((xcb_window_t *) xcb_get_property_value(r));
p_delete(&r); p_delete(&r);