raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=9b94849f924629ff4a93632024cdb51da03e6f4d
commit 9b94849f924629ff4a93632024cdb51da03e6f4d Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Wed Jan 30 09:31:47 2019 +0000 e focus - fix issue that affects qt popup menus e.g. in telegram it seems to create override-redirect popup windows that it FOCUSES instead of grabbking the kbd like most other menu windows so this causes the parent window to lose focus in a way that then causes the popups to dismiss instantly. @fix --- src/bin/e_comp_x.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index fc40de677..705daa5a3 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -135,10 +135,27 @@ _e_comp_x_focus_check(void) { focus_canvas_time = ecore_x_current_time_get(); focus_time = 0; - if (e_comp->comp_type == E_PIXMAP_TYPE_X) - e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE); - else + if (e_comp->comp_type != E_PIXMAP_TYPE_X) e_grabinput_focus(e_comp->root, E_FOCUS_METHOD_PASSIVE); +// this breaks Qt because it seems to create override-redirect popup windows +// that it FOCUSES instead of grabbking the kbd like most other menu windows +// so this causes the parent window to lose focus in a way that then causes +// the popups to dismiss instantly +// e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE); +// This might be more specific a workaround bit might miss other cases, so keep +// here as an idea and for future reference +/* + else + { + Ecore_X_Window *focus_win = ecore_x_window_focus_get(); + if (focus_win) + { + if ((ecore_x_window_root_get(focus_win) == focus_win) || + (!ecore_x_icccm_transient_for_get(focus_win))) + e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE); + } + } + */ } } --
