diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index c2370138e..099f9eee8 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -323,6 +323,21 @@ _get_or_create_client_extra(E_Client *ec) return extra; } +void +tiling_e_client_move_resize_extra(E_Client *ec, + int x, + int y, + int w, + int h) +{ + Client_Extra *extra = _get_or_create_client_extra(ec); + if (!extra) { + ERR("No extra for %p", ec); + } + + _e_client_move_resize(ec, x, y, w, h); +} + /* }}} */ /* Overlays {{{*/ diff --git a/src/modules/tiling/e_mod_tiling.h b/src/modules/tiling/e_mod_tiling.h index 353af31f3..e6f7ee833 100644 --- a/src/modules/tiling/e_mod_tiling.h +++ b/src/modules/tiling/e_mod_tiling.h @@ -87,6 +87,11 @@ get_vdesk(Eina_List *vdesks, int y, unsigned int zone_num); +void tiling_e_client_move_resize_extra(E_Client *ec, + int x, + int y, + int w, + int h); #define EINA_LIST_IS_IN(_list, _el) \ (eina_list_data_find(_list, _el) == _el) #define EINA_LIST_APPEND(_list, _el) \ diff --git a/src/modules/tiling/window_tree.c b/src/modules/tiling/window_tree.c index dc2b2fa5a..350966e22 100644 --- a/src/modules/tiling/window_tree.c +++ b/src/modules/tiling/window_tree.c @@ -1,6 +1,7 @@ #include "e.h" #include "window_tree.h" +#include "e_mod_tiling.h" void tiling_window_tree_walk(Window_Tree *root, void (*func)(void *)) @@ -243,18 +244,6 @@ tiling_window_tree_client_find(Window_Tree *root, E_Client *client) return NULL; } -/* FIXME: Deduplicate this func. */ -static void -_e_client_move_resize(E_Client *ec, - int x, - int y, - int w, - int h) -{ - DBG("%p -> %dx%d+%d+%d", ec, w, h, x, y); - evas_object_geometry_set(ec->frame, x, y, w, h); -} - void _tiling_window_tree_level_apply(Window_Tree *root, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, int level) @@ -263,7 +252,7 @@ _tiling_window_tree_level_apply(Window_Tree *root, Evas_Coord x, Evas_Coord y, Tiling_Split_Type split_type = level % 2; if (root->client) - _e_client_move_resize(root->client, x, y, w, h); + tiling_e_client_move_resize_extra(root->client, x, y, w, h); if (split_type == TILING_SPLIT_HORIZONTAL) { diff --git a/src/modules/tiling/window_tree.h b/src/modules/tiling/window_tree.h index 3f3433449..520899ca3 100644 --- a/src/modules/tiling/window_tree.h +++ b/src/modules/tiling/window_tree.h @@ -1,5 +1,5 @@ #ifndef WINDOW_TREE_H -#define WINDOW_TREE_HO +#define WINDOW_TREE_H #include /* XXX: Gotta be 0 and 1 because it's calculated using level % 2. */