From 63f3fe949cb4f2169a7b9ba74a96df701617b1de Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sat, 24 Jun 2017 12:18:04 -0400 Subject: [PATCH] block "user" client resizes during comp client updating phase resizing objects triggers clip resizes and further event feeding which can propagate mouse events such that clients try to resize themselves during the update phase, resulting in illegal compositor behavior --- src/bin/e_client.c | 1 + src/bin/e_comp.c | 2 ++ src/bin/e_comp.h | 1 + 3 files changed, 4 insertions(+) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 81dd185f9..1d18877b9 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -988,6 +988,7 @@ _e_client_resize_handle(E_Client *ec) int tw, th; Eina_List *skiplist = NULL; + if (e_comp->updating) return; x = ec->x; y = ec->y; w = ec->w; diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index c87822c1a..a4c5250ca 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -376,6 +376,7 @@ _e_comp_cb_update(void) if (e_comp->grab_cb) e_comp->grab_cb(); e_comp->grabbed = 1; } + e_comp->updating = 1; l = e_comp->updates; e_comp->updates = NULL; EINA_LIST_FREE(l, ec) @@ -384,6 +385,7 @@ _e_comp_cb_update(void) e_comp_object_render_update_del(ec->frame); _e_comp_client_update(ec); } + e_comp->updating = 0; _e_comp_fps_update(); if (conf->fps_show) { diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index f0c9737a5..745550d22 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -170,6 +170,7 @@ struct _E_Comp Eina_Bool shape_queue_blocked : 1; //x11 input shape updates are blocked Eina_Bool rendering : 1; // we've received a pre-render callback but no post-render yet. + Eina_Bool updating : 1; // running client updates };