forked from enlightenment/enlightenment
Start work on dual-mode window sizing/position.
SVN revision: 44109
This commit is contained in:
parent
a94c2e4e6b
commit
540383bfe7
|
@ -4,6 +4,14 @@
|
||||||
#include "e_mod_layout.h"
|
#include "e_mod_layout.h"
|
||||||
#include "e_mod_layout_illume.h"
|
#include "e_mod_layout_illume.h"
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
static void _border_calc_position(E_Zone *z, E_Border *bd, int *x, int *y, int *w, int *h);
|
||||||
|
|
||||||
|
/* local variables */
|
||||||
|
static int shelfsize = 0;
|
||||||
|
static int kbdsize = 0;
|
||||||
|
static int panelsize = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_border_add(E_Border *bd)
|
_border_add(E_Border *bd)
|
||||||
{ // handle a border being added
|
{ // handle a border being added
|
||||||
|
@ -34,11 +42,6 @@ _zone_layout(E_Zone *z)
|
||||||
Eina_List *l, *borders;
|
Eina_List *l, *borders;
|
||||||
E_Border *bd;
|
E_Border *bd;
|
||||||
|
|
||||||
// data for state
|
|
||||||
int shelfsize = 0;
|
|
||||||
int kbdsize = 0;
|
|
||||||
int panelsize = 0;
|
|
||||||
|
|
||||||
// phase 1. loop through borders to figure out sizes of things
|
// phase 1. loop through borders to figure out sizes of things
|
||||||
borders = e_border_client_list();
|
borders = e_border_client_list();
|
||||||
EINA_LIST_FOREACH(borders, l, bd)
|
EINA_LIST_FOREACH(borders, l, bd)
|
||||||
|
@ -94,7 +97,10 @@ _zone_layout(E_Zone *z)
|
||||||
}
|
}
|
||||||
else if (illume_border_is_home(bd))
|
else if (illume_border_is_home(bd))
|
||||||
{
|
{
|
||||||
e_border_move_resize(bd, z->x, z->y + shelfsize, z->w, z->h - shelfsize);
|
int x, y, w, h;
|
||||||
|
|
||||||
|
_border_calc_position(z, bd, &x, &y, &w, &h);
|
||||||
|
e_border_move_resize(bd, x, y, w, h);
|
||||||
if (bd->layer != 50) e_border_layer_set(bd, 50);
|
if (bd->layer != 50) e_border_layer_set(bd, 50);
|
||||||
}
|
}
|
||||||
else if (illume_border_is_dialog(bd))
|
else if (illume_border_is_dialog(bd))
|
||||||
|
@ -105,14 +111,10 @@ _zone_layout(E_Zone *z)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (il_cfg->policy.mode.dual)
|
int x, y, w, h;
|
||||||
{
|
|
||||||
/* determine where to place this border based on if any
|
_border_calc_position(z, bd, &x, &y, &w, &h);
|
||||||
* other borders are present, and also based on what the
|
e_border_move_resize(bd, x, y, w, h);
|
||||||
* current policy 'side' is set to */
|
|
||||||
}
|
|
||||||
else
|
|
||||||
e_border_move_resize(bd, z->x, z->y + shelfsize, z->w, z->h - shelfsize - kbdsize);
|
|
||||||
if (bd->layer != 100) e_border_layer_set(bd, 100);
|
if (bd->layer != 100) e_border_layer_set(bd, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,6 +126,24 @@ _zone_move_resize(E_Zone *z)
|
||||||
_zone_layout(z);
|
_zone_layout(z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* local functions */
|
||||||
|
static void
|
||||||
|
_border_calc_position(E_Zone *z, E_Border *bd, int *x, int *y, int *w, int *h)
|
||||||
|
{
|
||||||
|
if ((!z) || (!bd)) return;
|
||||||
|
if (il_cfg->policy.mode.dual)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (x) *x = z->x;
|
||||||
|
if (y) *y = (z->y + shelfsize);
|
||||||
|
if (w) *w = z->w;
|
||||||
|
if (h) *h = (z->h - shelfsize - panelsize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
const Illume_Layout_Mode laymode =
|
const Illume_Layout_Mode laymode =
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue