bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=1277ef97472e09d0d9533b7bd3b54e4113872b1e
commit 1277ef97472e09d0d9533b7bd3b54e4113872b1e Author: Marcel Hollerbach <[email protected]> Date: Fri Mar 10 21:44:08 2017 +0100 tiling: drop move requests from tiled clients --- src/modules/tiling/e_mod_tiling.c | 27 +++++++++++++++++++++++++++ src/modules/tiling/window_tree.c | 2 ++ 2 files changed, 29 insertions(+) diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index 383e364..d9a9602 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -1294,6 +1294,32 @@ _resize_hook(void *data EINA_UNUSED, int type EINA_UNUSED, return true; } +static Eina_Bool +_move_hook(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Client *event) +{ + E_Client *ec = event->ec; + Client_Extra *extra = tiling_entry_func(ec); + + if (!extra || !extra->tiled) + { + return true; + } + + /* A hack because e doesn't trigger events for all property changes */ + if (!is_tilable(ec)) + { + toggle_floating(ec); + + return true; + } + + e_client_act_move_end(event->ec, NULL); + + _reapply_tree(); + + return true; +} + static void _frame_del_cb(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) @@ -1787,6 +1813,7 @@ e_modapi_init(E_Module *m) _G.handler_client_add = e_client_hook_add(E_CLIENT_HOOK_UNIGNORE, _add_hook, NULL); HANDLER(_G.handler_client_resize, CLIENT_RESIZE, _resize_hook); + HANDLER(_G.handler_client_move, CLIENT_MOVE, _move_hook); HANDLER(_G.handler_client_iconify, CLIENT_ICONIFY, _iconify_hook); HANDLER(_G.handler_client_uniconify, CLIENT_UNICONIFY, _iconify_hook); diff --git a/src/modules/tiling/window_tree.c b/src/modules/tiling/window_tree.c index 8507c65..d8de002 100644 --- a/src/modules/tiling/window_tree.c +++ b/src/modules/tiling/window_tree.c @@ -134,6 +134,8 @@ tiling_window_tree_insert(Window_Tree *root, Window_Tree *buddy, } else { + if (!buddy) + buddy = root; _tiling_window_tree_split_add(buddy, new_node, !before); } --
