focus x11 root window on init when starting with xwayland

comp canvas does not have a valid xwindow and is unfocusable
This commit is contained in:
Mike Blumenkrantz 2017-07-28 13:49:30 -04:00
parent 04ef45f55d
commit 5ddb8779e2
1 changed files with 4 additions and 1 deletions

View File

@ -5554,7 +5554,10 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
if (!e_comp_canvas_init(w, h)) return EINA_FALSE;
}
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
else
e_grabinput_focus(e_comp->root, E_FOCUS_METHOD_PASSIVE);
/* init layers */
for (i = e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); i <= e_comp_canvas_layer_map(E_LAYER_CLIENT_PRIO); i++)