forked from enlightenment/enlightenment
Add illume atoms to e_border struct.
Add code to fetch illume atoms on border map & property changes (if needed). - This avoids a lot of round-trip calls to X when running illume2. Remove whitespace & fix some formatting. Use PATH_MAX instead of 4096. Update illume2 code to use new border atoms and avoid round-trip X calls. SVN revision: 44879
This commit is contained in:
parent
5ebb87d158
commit
f435c770e4
|
@ -460,6 +460,21 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map, int internal)
|
|||
bd->client.vkbd.fetch.state = 1;
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD)
|
||||
bd->client.vkbd.fetch.vkbd = 1;
|
||||
/* loop to check for illume atoms */
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_CONFORMANT)
|
||||
bd->client.illume.conformant.fetch.conformant = 1;
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE)
|
||||
bd->client.illume.quickpanel.fetch.state = 1;
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL)
|
||||
bd->client.illume.quickpanel.fetch.quickpanel = 1;
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR)
|
||||
bd->client.illume.quickpanel.fetch.priority.major = 1;
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR)
|
||||
bd->client.illume.quickpanel.fetch.priority.minor = 1;
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED)
|
||||
bd->client.illume.drag.fetch.locked = 1;
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_DRAG)
|
||||
bd->client.illume.drag.fetch.drag = 1;
|
||||
}
|
||||
free(atoms);
|
||||
}
|
||||
|
@ -4481,6 +4496,41 @@ _e_border_cb_window_property(void *data, int ev_type, void *ev)
|
|||
bd->client.vkbd.fetch.vkbd = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
else if (e->atom == ECORE_X_ATOM_E_ILLUME_CONFORMANT)
|
||||
{
|
||||
bd->client.illume.conformant.fetch.conformant = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
else if (e->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE)
|
||||
{
|
||||
bd->client.illume.quickpanel.fetch.state = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
else if (e->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL)
|
||||
{
|
||||
bd->client.illume.quickpanel.fetch.quickpanel = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
else if (e->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR)
|
||||
{
|
||||
bd->client.illume.quickpanel.fetch.priority.major = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
else if (e->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR)
|
||||
{
|
||||
bd->client.illume.quickpanel.fetch.priority.minor = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
else if (e->atom == ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED)
|
||||
{
|
||||
bd->client.illume.drag.fetch.locked = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
else if (e->atom == ECORE_X_ATOM_E_ILLUME_DRAG)
|
||||
{
|
||||
bd->client.illume.drag.fetch.drag = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
/*
|
||||
else if (e->atom == ECORE_X_ATOM_NET_WM_USER_TIME)
|
||||
{
|
||||
|
@ -5580,6 +5630,7 @@ _e_border_eval0(E_Border *bd)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Border *child;
|
||||
|
||||
EINA_LIST_FOREACH(bd->leader->group, l, child)
|
||||
{
|
||||
if ((child != bd) && (child->focused))
|
||||
|
@ -5598,10 +5649,8 @@ _e_border_eval0(E_Border *bd)
|
|||
|
||||
bd->client.icccm.fetch.title = 0;
|
||||
if (bd->bg_object)
|
||||
{
|
||||
edje_object_part_text_set(bd->bg_object, "e.text.title",
|
||||
bd->client.icccm.title);
|
||||
}
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.netwm.fetch.name)
|
||||
|
@ -5611,10 +5660,8 @@ _e_border_eval0(E_Border *bd)
|
|||
|
||||
bd->client.netwm.fetch.name = 0;
|
||||
if (bd->bg_object)
|
||||
{
|
||||
edje_object_part_text_set(bd->bg_object, "e.text.title",
|
||||
bd->client.netwm.name);
|
||||
}
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.icccm.fetch.name_class)
|
||||
|
@ -5954,6 +6001,55 @@ _e_border_eval0(E_Border *bd)
|
|||
bd->client.vkbd.fetch.vkbd = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.illume.conformant.fetch.conformant)
|
||||
{
|
||||
bd->client.illume.conformant.conformant =
|
||||
ecore_x_e_illume_conformant_get(bd->client.win);
|
||||
bd->client.illume.conformant.fetch.conformant = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.illume.quickpanel.fetch.state)
|
||||
{
|
||||
bd->client.illume.quickpanel.state =
|
||||
ecore_x_e_illume_quickpanel_state_get(bd->client.win);
|
||||
bd->client.illume.quickpanel.fetch.state = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.illume.quickpanel.fetch.quickpanel)
|
||||
{
|
||||
bd->client.illume.quickpanel.quickpanel =
|
||||
ecore_x_e_illume_quickpanel_get(bd->client.win);
|
||||
bd->client.illume.quickpanel.fetch.quickpanel = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.illume.quickpanel.fetch.priority.major)
|
||||
{
|
||||
bd->client.illume.quickpanel.priority.major =
|
||||
ecore_x_e_illume_quickpanel_priority_major_get(bd->client.win);
|
||||
bd->client.illume.quickpanel.fetch.priority.major = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.illume.quickpanel.fetch.priority.minor)
|
||||
{
|
||||
bd->client.illume.quickpanel.priority.minor =
|
||||
ecore_x_e_illume_quickpanel_priority_minor_get(bd->client.win);
|
||||
bd->client.illume.quickpanel.fetch.priority.minor = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.illume.drag.fetch.drag)
|
||||
{
|
||||
bd->client.illume.drag.drag =
|
||||
ecore_x_e_illume_drag_get(bd->client.win);
|
||||
bd->client.illume.drag.fetch.drag = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->client.illume.drag.fetch.locked)
|
||||
{
|
||||
bd->client.illume.drag.locked =
|
||||
ecore_x_e_illume_drag_locked_get(bd->client.win);
|
||||
bd->client.illume.drag.fetch.locked = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
if (bd->changes.shape)
|
||||
{
|
||||
Ecore_X_Rectangle *rects;
|
||||
|
@ -6059,6 +6155,7 @@ _e_border_eval0(E_Border *bd)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Border *child;
|
||||
|
||||
EINA_LIST_FOREACH(bd->leader->group, l, child)
|
||||
{
|
||||
if ((child != bd) && (child->focused))
|
||||
|
@ -6102,11 +6199,10 @@ _e_border_eval0(E_Border *bd)
|
|||
(!(((bd->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN))))
|
||||
{
|
||||
Evas_Object *o;
|
||||
char buf[4096];
|
||||
char buf[PATH_MAX];
|
||||
const char *bordername;
|
||||
Evas_Coord cx, cy, cw, ch;
|
||||
int l, r, t, b;
|
||||
int ok;
|
||||
int l, r, t, b, ok;
|
||||
|
||||
if (bd->fullscreen)
|
||||
bordername = "borderless";
|
||||
|
@ -6143,7 +6239,8 @@ _e_border_eval0(E_Border *bd)
|
|||
|
||||
if ((!bd->client.border.name) || (strcmp(bd->client.border.name, bordername)))
|
||||
{
|
||||
if (bd->client.border.name) eina_stringshare_del(bd->client.border.name);
|
||||
if (bd->client.border.name)
|
||||
eina_stringshare_del(bd->client.border.name);
|
||||
bd->client.border.name = eina_stringshare_add(bordername);
|
||||
|
||||
if (bd->bg_object)
|
||||
|
@ -6182,10 +6279,8 @@ _e_border_eval0(E_Border *bd)
|
|||
|
||||
bd->bg_object = o;
|
||||
shape_option = edje_object_data_get(o, "shaped");
|
||||
if (shape_option && !strcmp(shape_option, "1"))
|
||||
{
|
||||
if ((shape_option) && (!strcmp(shape_option, "1")))
|
||||
bd->shaped = 1;
|
||||
}
|
||||
|
||||
if (bd->client.netwm.name)
|
||||
edje_object_part_text_set(o, "e.text.title",
|
||||
|
@ -6195,7 +6290,8 @@ _e_border_eval0(E_Border *bd)
|
|||
bd->client.icccm.title);
|
||||
evas_object_resize(o, 1000, 1000);
|
||||
edje_object_calc_force(o);
|
||||
edje_object_part_geometry_get(o, "e.swallow.client", &cx, &cy, &cw, &ch);
|
||||
edje_object_part_geometry_get(o, "e.swallow.client",
|
||||
&cx, &cy, &cw, &ch);
|
||||
l = cx;
|
||||
r = 1000 - (cx + cw);
|
||||
t = cy;
|
||||
|
@ -6266,16 +6362,16 @@ _e_border_eval0(E_Border *bd)
|
|||
}
|
||||
}
|
||||
|
||||
if (rem_change)
|
||||
e_remember_update(bd);
|
||||
if (rem_change) e_remember_update(bd);
|
||||
|
||||
if (change_urgent)
|
||||
{
|
||||
E_Event_Border_Urgent_Change *ev;
|
||||
|
||||
if (bd->client.icccm.urgent)
|
||||
edje_object_signal_emit(bd->bg_object, "e,state,urgent", "e");
|
||||
else
|
||||
edje_object_signal_emit(bd->bg_object, "e,state,not_urgent", "e");
|
||||
E_Event_Border_Urgent_Change *ev;
|
||||
|
||||
ev = E_NEW(E_Event_Border_Urgent_Change, 1);
|
||||
ev->border = bd;
|
||||
|
|
|
@ -365,6 +365,48 @@ struct _E_Border
|
|||
unsigned char vkbd : 1;
|
||||
} vkbd;
|
||||
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned char conformant : 1;
|
||||
} fetch;
|
||||
unsigned char conformant : 1;
|
||||
} conformant;
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned char state : 1;
|
||||
struct
|
||||
{
|
||||
unsigned int major : 1;
|
||||
unsigned int minor : 1;
|
||||
} priority;
|
||||
unsigned char quickpanel : 1;
|
||||
} fetch;
|
||||
Ecore_X_Illume_Quickpanel_State state;
|
||||
struct
|
||||
{
|
||||
unsigned int major : 1;
|
||||
unsigned int minor : 1;
|
||||
} priority;
|
||||
unsigned char quickpanel : 1;
|
||||
} quickpanel;
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned char drag : 1;
|
||||
unsigned char locked : 1;
|
||||
} fetch;
|
||||
unsigned char drag : 1;
|
||||
unsigned char locked : 1;
|
||||
} drag;
|
||||
} illume;
|
||||
|
||||
Ecore_X_Window_Attributes initial_attributes;
|
||||
} client;
|
||||
|
||||
|
|
|
@ -174,14 +174,15 @@ EAPI int
|
|||
e_illume_border_is_conformant(E_Border *bd)
|
||||
{
|
||||
if (strstr(bd->client.icccm.class, "config")) return EINA_FALSE;
|
||||
return ecore_x_e_illume_conformant_get(bd->client.win);
|
||||
return bd->client.illume.conformant.conformant;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
e_illume_border_is_quickpanel(E_Border *bd)
|
||||
{
|
||||
if (strstr(bd->client.icccm.class, "config")) return EINA_FALSE;
|
||||
return ecore_x_e_illume_quickpanel_get(bd->client.win);
|
||||
return bd->client.illume.quickpanel.quickpanel;
|
||||
// return ecore_x_e_illume_quickpanel_get(bd->client.win);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
|
|
|
@ -44,6 +44,7 @@ static void
|
|||
_il_config_policy_free(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
if (_policy_change_timer) ecore_timer_del(_policy_change_timer);
|
||||
_policy_change_timer = NULL;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
|
|
@ -178,7 +178,7 @@ _layout_zone_layout(E_Zone *zone)
|
|||
if (e_illume_border_is_top_shelf(bd))
|
||||
{
|
||||
/* make sure we are not dragging the shelf */
|
||||
if (!ecore_x_e_illume_drag_get(bd->client.win))
|
||||
if (!bd->client.illume.drag.drag)
|
||||
{
|
||||
/* if we are not in dual mode, then set shelf to top */
|
||||
if (!il_cfg->policy.mode.dual)
|
||||
|
@ -199,7 +199,7 @@ _layout_zone_layout(E_Zone *zone)
|
|||
else if (e_illume_border_is_bottom_panel(bd))
|
||||
{
|
||||
/* make sure we are not dragging the bottom panel */
|
||||
if (!ecore_x_e_illume_drag_get(bd->client.win))
|
||||
if (!bd->client.illume.drag.drag)
|
||||
_border_resize_fx(bd, zone->x, (zone->y + zone->h - panelsize),
|
||||
zone->w, panelsize);
|
||||
e_border_stick(bd);
|
||||
|
@ -477,8 +477,9 @@ _zone_layout_dual_top_custom(E_Border *bd)
|
|||
|
||||
/* more than one valid border */
|
||||
|
||||
if (ecore_x_e_virtual_keyboard_state_get(bd->client.win) >
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
if (bd->client.vkbd.state == ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
// if (ecore_x_e_virtual_keyboard_state_get(bd->client.win) >
|
||||
// ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
{
|
||||
bh = ah;
|
||||
by = ay;
|
||||
|
@ -501,8 +502,9 @@ _zone_layout_dual_top_custom(E_Border *bd)
|
|||
{
|
||||
if (bt == e_border_focused_get())
|
||||
{
|
||||
if (ecore_x_e_virtual_keyboard_state_get(bd->client.win) <=
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
if (bd->client.vkbd.state == ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
// if (ecore_x_e_virtual_keyboard_state_get(bd->client.win) <=
|
||||
// ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
{
|
||||
bh = zh;
|
||||
by = zy;
|
||||
|
@ -515,8 +517,9 @@ _zone_layout_dual_top_custom(E_Border *bd)
|
|||
}
|
||||
else if (bb = e_border_focused_get())
|
||||
{
|
||||
if (ecore_x_e_virtual_keyboard_state_get(bd->client.win) <=
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
if (bd->client.vkbd.state == ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
// if (ecore_x_e_virtual_keyboard_state_get(bd->client.win) <=
|
||||
// ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
|
||||
{
|
||||
bh = ah;
|
||||
by = ay;
|
||||
|
|
4
x-ui.sh
4
x-ui.sh
|
@ -5,8 +5,8 @@
|
|||
#Xephyr :1 -noreset -ac -br -dpi 186 -screen 272x480x16 &
|
||||
#Xephyr :1 -noreset -ac -br -dpi 186 -screen 480x272x16 &
|
||||
#Xephyr :1 -noreset -ac -br -dpi 181 -screen 320x320x16 &
|
||||
Xephyr :1 -noreset -ac -br -dpi 183 -screen 320x480x16 -host-cursor &
|
||||
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 480x320x16 -host-cursor &
|
||||
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 320x480x16 -host-cursor &
|
||||
Xephyr :1 -noreset -ac -br -dpi 183 -screen 480x320x16 -host-cursor &
|
||||
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 480x800x16 &
|
||||
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 800x480x16 &
|
||||
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640x16 &
|
||||
|
|
Loading…
Reference in New Issue