wl_x11: Fix wrong return value on function that does not return bool....

Read the API. Returns INT ...

Also, you're already getting root so create randr canvas_new with that
first.,.. then check that Root is 'managed'...
This commit is contained in:
Christopher Michael 2020-11-09 21:28:32 -05:00
parent bf63b590e2
commit c82f6e81d1
1 changed files with 10 additions and 4 deletions

View File

@ -10,7 +10,7 @@ e_modapi_init(E_Module *m)
{ {
int w = 0, h = 0; int w = 0, h = 0;
Ecore_X_Window root, win; Ecore_X_Window root, win;
Eina_Bool managed; int managed;
printf("LOAD WL_X11 MODULE\n"); printf("LOAD WL_X11 MODULE\n");
@ -20,9 +20,15 @@ e_modapi_init(E_Module *m)
return NULL; return NULL;
} }
root = ecore_x_window_root_first_get(); root = ecore_x_window_root_first_get();
managed = !!ecore_x_window_prop_window_get(root, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK,
&win, 1); /* get root and setup canvas first */
e_comp_x_randr_canvas_new(ecore_x_window_root_first_get(), 1, 1); e_comp_x_randr_canvas_new(root, 1, 1);
/* then check if it's 'managed' or not */
managed =
ecore_x_window_prop_window_get(root,
ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK,
&win, 1);
if (!e_comp->ee) if (!e_comp->ee)
{ {