aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-01-30 09:31:47 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-01-30 09:31:47 +0000
commit9b94849f924629ff4a93632024cdb51da03e6f4d (patch)
treeb66a46c687d810491f0644e4f47031126d3590bb
parentpager - fix vanishing windows when dnd from desk to desk in pager (diff)
downloadenlightenment-9b94849f924629ff4a93632024cdb51da03e6f4d.tar.gz
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
-rw-r--r--src/bin/e_comp_x.c23
1 files 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);
+ }
+ }
+ */
}
}