summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-14 07:27:11 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-14 07:30:04 -0400
commitb2c5c20cde89e22797db95b59590a9ecacdbb33b (patch)
tree8ce76777a2dd32263bc2200b5076de817319a5a0
parentd9737ddba548a87c49e9ced525de8f83d2608b97 (diff)
downloadenlightenment-b2c5c20cde89e22797db95b59590a9ecacdbb33b.tar.gz
manually get client under pointer for checking x11 pointer focus
e_client_under_pointer_get() ignores overrides. ref 3ee5a0378d2b41313156748ec33202c44c117239 fix T5878, T5871 IF ONLY THERE WERE SOME METHOD FOR TESTING COMMITS BEFORE THEY WERE PUSHED
-rw-r--r--src/bin/e_comp_x.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index c9bf7fe7cf..b907462d57 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -2382,11 +2382,24 @@ _e_comp_x_mouse_in_job(void *d EINA_UNUSED)
static Eina_Bool
_e_comp_x_mouse_in_fix_check_timer_cb(void *data EINA_UNUSED)
{
- E_Client *ec;
+ E_Client *ec = NULL, *cec;
+ int x, y;
mouse_in_fix_check_timer = NULL;
- ec = e_client_under_pointer_get
- (e_desk_current_get(e_zone_current_get()), NULL);
+ ecore_evas_pointer_xy_get(e_comp->ee, &x, &y);
+ E_CLIENT_REVERSE_FOREACH(cec)
+ {
+ /* If a border was specified which should be excluded from the list
+ * (because it will be closed shortly for example), skip */
+ if ((!e_client_util_desk_visible(cec, e_desk_current_get(e_zone_current_get())))) continue;
+ if (!evas_object_visible_get(cec->frame)) continue;
+ if (!E_INSIDE(x, y, cec->x, cec->y, cec->w, cec->h))
+ continue;
+ /* If the layer is higher, the position of the window is higher
+ * (always on top vs always below) */
+ if (!ec || (cec->layer > ec->layer))
+ ec = cec;
+ }
if (ec)
{
mouse_client = ec;