forked from enlightenment/enlightenment
simplify comp_x screen setup
we only care about the first root now, no point getting all the roots
This commit is contained in:
parent
0c0d481e4e
commit
4afb4b8fe9
|
@ -4965,33 +4965,20 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_comp_x_screens_setup(void)
|
_e_comp_x_screens_setup(void)
|
||||||
{
|
{
|
||||||
int n, i;
|
Ecore_X_Window root;
|
||||||
Ecore_X_Window *roots;
|
int rw, rh;
|
||||||
Eina_Bool success = EINA_FALSE;
|
|
||||||
|
|
||||||
e_comp_x_randr_screen_iface_set();
|
e_comp_x_randr_screen_iface_set();
|
||||||
if (!e_randr2_init()) return 0;
|
if (!e_randr2_init()) return 0;
|
||||||
roots = ecore_x_window_root_list(&n);
|
root = ecore_x_window_root_first_get();
|
||||||
if ((!roots) || (n <= 0))
|
if (!root)
|
||||||
{
|
{
|
||||||
free(roots);
|
e_error_message_show("X reports there are no root windows!\n");
|
||||||
e_error_message_show("X reports there are no root windows and %i screens!\n",
|
|
||||||
n);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for (i = 0; i < 1; i++)
|
ecore_x_window_size_get(root, &rw, &rh);
|
||||||
{
|
e_randr2_screens_setup(rw, rh);
|
||||||
int rw, rh;
|
return _e_comp_x_setup(root, rw, rh);
|
||||||
Ecore_X_Window root = roots[i];
|
|
||||||
|
|
||||||
ecore_x_window_size_get(root, &rw, &rh);
|
|
||||||
|
|
||||||
e_randr2_screens_setup(rw, rh);
|
|
||||||
success = _e_comp_x_setup(root, rw, rh);
|
|
||||||
if (!success) break;
|
|
||||||
}
|
|
||||||
free(roots);
|
|
||||||
return success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EINTERN Eina_Bool
|
EINTERN Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue