forked from enlightenment/efl
ecore_x: Only use att if call succeeds.
XGetWindowAttributes isn't guaranteed to succeed. Fixes CID 1039692
This commit is contained in:
parent
6b1438af05
commit
31d0a2d71c
|
@ -1591,14 +1591,16 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* ewww - round trip */
|
/* ewww - round trip */
|
||||||
XGetWindowAttributes(_ecore_x_disp, parent, &att);
|
if (XGetWindowAttributes(_ecore_x_disp, parent, &att))
|
||||||
if (_ecore_xlib_sync) ecore_x_sync();
|
|
||||||
for (i = 0; i < ScreenCount(_ecore_x_disp); i++)
|
|
||||||
{
|
{
|
||||||
if (att.screen == ScreenOfDisplay(_ecore_x_disp, i))
|
if (_ecore_xlib_sync) ecore_x_sync();
|
||||||
|
for (i = 0; i < ScreenCount(_ecore_x_disp); i++)
|
||||||
{
|
{
|
||||||
scr = i;
|
if (att.screen == ScreenOfDisplay(_ecore_x_disp, i))
|
||||||
break;
|
{
|
||||||
|
scr = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue