forked from enlightenment/enlightenment
Tiling2: Create a move/resize function that will update extra.
This commit is contained in:
parent
b0593cd939
commit
8dd65b90f3
|
@ -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 {{{*/
|
||||
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef WINDOW_TREE_H
|
||||
#define WINDOW_TREE_HO
|
||||
#define WINDOW_TREE_H
|
||||
#include <e.h>
|
||||
|
||||
/* XXX: Gotta be 0 and 1 because it's calculated using level % 2. */
|
||||
|
|
Loading…
Reference in New Issue