From 60d78371dbb126308640c54562738275d6145078 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Wed, 14 May 2014 11:05:51 +0100 Subject: [PATCH] tiling: fix enlightenment can be freezed by infinite event callback. Summary: initialize the tinfo when remove client in tiling. the reason why of "freezing" that tiling added window twice into _G.tinfo->tree. then tiling module set to a different size about same window as if two different window. finally, the event "E_EVENT_CLIENT_MOVE" occurs by changing geometry, and tiling resize the window again by the event "E_EVENT_CLIENT_MOVE". next, it is the cause of this problem. In (4), when user types ALT+TAP. - tiling module adds uniconify window into _G.tinfo->tree. - at this time, _G.tinfo is the informaion of one desk. - E create input_only window and destoryed for a moment. - tiling module initialize the _G.tinfo by the event EVAS_CALLBACK_DEL happend by destorying input window. - now, _G.tinfo is the informaion of the other desk. In (5), iconify app. - tiling try to remove window from _G.tinfo->tree, but failed. (problem) - because _G.tinfo isn't initialized to the desk including uniconify window at that time. In (6), uniconify app. - tiling change the _G.tinfo, then insert client info to _G.tinfo. so I suggest that initializing the _G.tinfo when removing window. Test Plan: (1) launch any app. (2) Iconify it. (3) change the desk different with launching app. (4) Uniconify app by ALT+TAP. (5) Iconify it again. (6) Uniconify it again. Reviewers: raster, zmike, tom, tasn Reviewed By: tasn CC: cedric Differential Revision: https://phab.enlightenment.org/D850 --- src/modules/tiling/e_mod_tiling.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index de0ba039f..d0874bd17 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -640,8 +640,11 @@ _client_remove_no_apply(E_Client *ec) static void _remove_client(E_Client *ec) { - if (_client_remove_no_apply(ec)) - _reapply_tree(); + if (desk_should_tile_check(ec->desk)) + { + if (_client_remove_no_apply(ec)) + _reapply_tree(); + } } /* }}} */