forked from enlightenment/enlightenment
parent
f18b13c902
commit
b7e6e8b1f2
6
TODO
6
TODO
|
@ -8,6 +8,9 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
BUGS / FIXES
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
* e_hints.c manually changes flags on a border isnetad of calling
|
||||
e_border_stick() for exampe or the calls in e_border.c - add calls as needed
|
||||
to e_border.c. before calling check the lock flags too.
|
||||
* BUG: in general fullscreen needs work, cleaning and testing. dont allow
|
||||
desktop switches for the desk a fullscreened window is on, nor allow windows
|
||||
to be raised above the fs win etc. ie the app must seem to be entirely fs for
|
||||
|
@ -40,8 +43,7 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
ESSENTIAL FEATURES
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
* add window placement optiond like place at pointer
|
||||
* add option like "focus all new windows" etc.
|
||||
* add window placement options like place at pointer
|
||||
* shaded windows should not allow border changes by the user
|
||||
* if a border is borderless it should not be allowed to be shaded (padl/r/t/b
|
||||
is 0)
|
||||
|
|
|
@ -58,14 +58,16 @@ ACT_FN_GO(window_move)
|
|||
if (!obj) obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
if (obj->type != E_BORDER_TYPE) return;
|
||||
e_border_act_move_begin((E_Border *)obj, NULL);
|
||||
if (!((E_Border *)obj)->lock_user_location)
|
||||
e_border_act_move_begin((E_Border *)obj, NULL);
|
||||
}
|
||||
ACT_FN_GO_MOUSE(window_move)
|
||||
{
|
||||
if (!obj) obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
if (obj->type != E_BORDER_TYPE) return;
|
||||
e_border_act_move_begin((E_Border *)obj, ev);
|
||||
if (!((E_Border *)obj)->lock_user_location)
|
||||
e_border_act_move_begin((E_Border *)obj, ev);
|
||||
}
|
||||
ACT_FN_END(window_move)
|
||||
{
|
||||
|
@ -88,14 +90,16 @@ ACT_FN_GO(window_resize)
|
|||
if (!obj) obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
if (obj->type != E_BORDER_TYPE) return;
|
||||
e_border_act_resize_begin((E_Border *)obj, NULL);
|
||||
if (!((E_Border *)obj)->lock_user_size)
|
||||
e_border_act_resize_begin((E_Border *)obj, NULL);
|
||||
}
|
||||
ACT_FN_GO_MOUSE(window_resize)
|
||||
{
|
||||
if (!obj) obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
if (obj->type != E_BORDER_TYPE) return;
|
||||
e_border_act_resize_begin((E_Border *)obj, ev);
|
||||
if (!((E_Border *)obj)->lock_user_size)
|
||||
e_border_act_resize_begin((E_Border *)obj, ev);
|
||||
}
|
||||
ACT_FN_END(window_resize)
|
||||
{
|
||||
|
@ -157,7 +161,8 @@ ACT_FN_GO(window_raise)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
e_border_raise((E_Border *)obj);
|
||||
if (!((E_Border *)obj)->lock_user_stacking)
|
||||
e_border_raise((E_Border *)obj);
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
@ -170,7 +175,8 @@ ACT_FN_GO(window_lower)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
e_border_lower((E_Border *)obj);
|
||||
if (!((E_Border *)obj)->lock_user_stacking)
|
||||
e_border_lower((E_Border *)obj);
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
@ -183,7 +189,8 @@ ACT_FN_GO(window_close)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
e_border_act_close_begin((E_Border *)obj);
|
||||
if (!((E_Border *)obj)->lock_close)
|
||||
e_border_act_close_begin((E_Border *)obj);
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
@ -196,7 +203,8 @@ ACT_FN_GO(window_kill)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
e_border_act_kill_begin((E_Border *)obj);
|
||||
if (!((E_Border *)obj)->lock_close)
|
||||
e_border_act_kill_begin((E_Border *)obj);
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
@ -209,6 +217,7 @@ ACT_FN_GO(window_sticky_toggle)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
if (!((E_Border *)obj)->lock_user_sticky)
|
||||
{
|
||||
E_Border *bd;
|
||||
|
||||
|
@ -228,6 +237,7 @@ ACT_FN_GO(window_iconic_toggle)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
if (!((E_Border *)obj)->lock_user_iconify)
|
||||
{
|
||||
E_Border *bd;
|
||||
|
||||
|
@ -247,6 +257,7 @@ ACT_FN_GO(window_maximized_toggle)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
if (!((E_Border *)obj)->lock_user_maximize)
|
||||
{
|
||||
E_Border *bd;
|
||||
|
||||
|
@ -266,6 +277,7 @@ ACT_FN_GO(window_shaded_toggle)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
if (!((E_Border *)obj)->lock_user_shade)
|
||||
{
|
||||
E_Border *bd;
|
||||
|
||||
|
|
|
@ -1686,6 +1686,7 @@ e_border_act_menu_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev, int k
|
|||
void
|
||||
e_border_act_close_begin(E_Border *bd)
|
||||
{
|
||||
if (bd->lock_close) return;
|
||||
if (bd->client.icccm.delete_request)
|
||||
{
|
||||
bd->delete_requested = 1;
|
||||
|
@ -1700,6 +1701,7 @@ e_border_act_close_begin(E_Border *bd)
|
|||
void
|
||||
e_border_act_kill_begin(E_Border *bd)
|
||||
{
|
||||
if (bd->lock_close) return;
|
||||
if ((bd->client.netwm.pid > 1) && (e_config->kill_process))
|
||||
{
|
||||
kill(bd->client.netwm.pid, SIGINT);
|
||||
|
@ -2030,12 +2032,16 @@ _e_border_cb_window_show_request(void *data, int ev_type, void *ev)
|
|||
bd = e_border_find_by_client_window(e->win);
|
||||
if (!bd) return 1;
|
||||
if (bd->iconic)
|
||||
e_border_uniconify(bd);
|
||||
{
|
||||
if (!bd->lock_client_iconify)
|
||||
e_border_uniconify(bd);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: make border "urgent" for a bit - it wants attention */
|
||||
/* e_border_show(bd); */
|
||||
e_border_raise(bd);
|
||||
if (!bd->lock_client_stacking)
|
||||
e_border_raise(bd);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -2201,57 +2207,60 @@ _e_border_cb_window_configure_request(void *data, int ev_type, void *ev)
|
|||
if (!bd->lock_client_size)
|
||||
e_border_resize(bd, w, h);
|
||||
}
|
||||
if ((e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE) &&
|
||||
(e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING))
|
||||
if (!bd->lock_client_stacking)
|
||||
{
|
||||
E_Border *obd;
|
||||
|
||||
if (e->detail == ECORE_X_WINDOW_STACK_ABOVE)
|
||||
if ((e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE) &&
|
||||
(e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING))
|
||||
{
|
||||
obd = e_border_find_by_client_window(e->abovewin);
|
||||
if (obd)
|
||||
e_border_stack_above(bd, obd);
|
||||
E_Border *obd;
|
||||
|
||||
if (e->detail == ECORE_X_WINDOW_STACK_ABOVE)
|
||||
{
|
||||
obd = e_border_find_by_client_window(e->abovewin);
|
||||
if (obd)
|
||||
e_border_stack_above(bd, obd);
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_BELOW)
|
||||
{
|
||||
obd = e_border_find_by_client_window(e->abovewin);
|
||||
if (obd)
|
||||
e_border_stack_below(bd, obd);
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_TOP_IF)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_BOTTOM_IF)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_OPPOSITE)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_BELOW)
|
||||
else if (e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE)
|
||||
{
|
||||
obd = e_border_find_by_client_window(e->abovewin);
|
||||
if (obd)
|
||||
e_border_stack_below(bd, obd);
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_TOP_IF)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_BOTTOM_IF)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_OPPOSITE)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
}
|
||||
else if (e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE)
|
||||
{
|
||||
if (e->detail == ECORE_X_WINDOW_STACK_ABOVE)
|
||||
{
|
||||
e_border_raise(bd);
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_BELOW)
|
||||
{
|
||||
e_border_lower(bd);
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_TOP_IF)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_BOTTOM_IF)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_OPPOSITE)
|
||||
{
|
||||
/* FIXME: do */
|
||||
if (e->detail == ECORE_X_WINDOW_STACK_ABOVE)
|
||||
{
|
||||
e_border_raise(bd);
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_BELOW)
|
||||
{
|
||||
e_border_lower(bd);
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_TOP_IF)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_BOTTOM_IF)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
else if (e->detail == ECORE_X_WINDOW_STACK_OPPOSITE)
|
||||
{
|
||||
/* FIXME: do */
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
@ -2656,7 +2665,8 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
|
|||
bd->moveinfo.down.my = e->y;
|
||||
grabbed = 1;
|
||||
|
||||
e_border_raise(bd);
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
if (e->direction == RESIZE_TL)
|
||||
{
|
||||
if (!_e_border_resize_begin(bd))
|
||||
|
@ -3036,37 +3046,56 @@ _e_border_cb_signal_action(void *data, Evas_Object *obj, const char *emission, c
|
|||
|
||||
if (!strcmp(source, "close"))
|
||||
{
|
||||
e_border_act_close_begin(bd);
|
||||
if (!bd->lock_close)
|
||||
e_border_act_close_begin(bd);
|
||||
}
|
||||
else if (!strcmp(source, "shade_up") || !strcmp(source, "shade"))
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_UP);
|
||||
else e_border_shade(bd, E_DIRECTION_UP);
|
||||
if (!bd->lock_user_shade)
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_UP);
|
||||
else e_border_shade(bd, E_DIRECTION_UP);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(source, "shade_down"))
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_DOWN);
|
||||
else e_border_shade(bd, E_DIRECTION_DOWN);
|
||||
if (!bd->lock_user_shade)
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_DOWN);
|
||||
else e_border_shade(bd, E_DIRECTION_DOWN);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(source, "shade_left"))
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_LEFT);
|
||||
else e_border_shade(bd, E_DIRECTION_LEFT);
|
||||
if (!bd->lock_user_shade)
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_LEFT);
|
||||
else e_border_shade(bd, E_DIRECTION_LEFT);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(source, "shade_right"))
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_RIGHT);
|
||||
else e_border_shade(bd, E_DIRECTION_RIGHT);
|
||||
if (!bd->lock_user_shade)
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_RIGHT);
|
||||
else e_border_shade(bd, E_DIRECTION_RIGHT);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(source, "maximize"))
|
||||
{
|
||||
if (bd->maximized) e_border_unmaximize(bd);
|
||||
else e_border_maximize(bd, e_config->maximize_policy);
|
||||
if (!bd->lock_user_maximize)
|
||||
{
|
||||
if (bd->maximized) e_border_unmaximize(bd);
|
||||
else e_border_maximize(bd, e_config->maximize_policy);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(source, "iconify"))
|
||||
{
|
||||
if (bd->iconic) e_border_uniconify(bd);
|
||||
else e_border_iconify(bd);
|
||||
if (!bd->lock_user_iconify)
|
||||
{
|
||||
if (bd->iconic) e_border_uniconify(bd);
|
||||
else e_border_iconify(bd);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(source, "menu"))
|
||||
{
|
||||
|
@ -3075,9 +3104,15 @@ _e_border_cb_signal_action(void *data, Evas_Object *obj, const char *emission, c
|
|||
evas_pointer_canvas_xy_get(bd->bg_evas , &x, &y);
|
||||
_e_border_menu_show(bd, x + bd->x, y + bd->y, 0);
|
||||
}
|
||||
else if (!strcmp(source, "raise"))
|
||||
{
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
}
|
||||
else if (!strcmp(source, "lower"))
|
||||
{
|
||||
e_border_lower(bd);
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_lower(bd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3666,27 +3701,30 @@ _e_border_eval(E_Border *bd)
|
|||
if (bd->client.netwm.fetch.type)
|
||||
{
|
||||
e_hints_window_type_get(bd);
|
||||
if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DESKTOP)
|
||||
if ((!bd->lock_border) || (!bd->client.border.name))
|
||||
{
|
||||
if (bd->client.border.name) free(bd->client.border.name);
|
||||
bd->client.border.name = strdup("borderless");
|
||||
bd->client.border.changed = 1;
|
||||
}
|
||||
if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DOCK)
|
||||
{
|
||||
if (bd->client.border.name) free(bd->client.border.name);
|
||||
bd->client.border.name = strdup("borderless");
|
||||
bd->client.border.changed = 1;
|
||||
|
||||
if (!bd->client.netwm.state.skip_pager)
|
||||
if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DESKTOP)
|
||||
{
|
||||
bd->client.netwm.state.skip_pager = 1;
|
||||
bd->client.netwm.update.state = 1;
|
||||
if (bd->client.border.name) free(bd->client.border.name);
|
||||
bd->client.border.name = strdup("borderless");
|
||||
bd->client.border.changed = 1;
|
||||
}
|
||||
if (!bd->client.netwm.state.skip_taskbar)
|
||||
if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DOCK)
|
||||
{
|
||||
bd->client.netwm.state.skip_taskbar = 1;
|
||||
bd->client.netwm.update.state = 1;
|
||||
if (bd->client.border.name) free(bd->client.border.name);
|
||||
bd->client.border.name = strdup("borderless");
|
||||
bd->client.border.changed = 1;
|
||||
|
||||
if (!bd->client.netwm.state.skip_pager)
|
||||
{
|
||||
bd->client.netwm.state.skip_pager = 1;
|
||||
bd->client.netwm.update.state = 1;
|
||||
}
|
||||
if (!bd->client.netwm.state.skip_taskbar)
|
||||
{
|
||||
bd->client.netwm.state.skip_taskbar = 1;
|
||||
bd->client.netwm.update.state = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3820,14 +3858,17 @@ _e_border_eval(E_Border *bd)
|
|||
}
|
||||
if (bd->client.mwm.borderless != pb)
|
||||
{
|
||||
if (bd->client.border.name) free(bd->client.border.name);
|
||||
if (bd->client.mwm.borderless)
|
||||
bd->client.border.name = strdup("borderless");
|
||||
else
|
||||
bd->client.border.name = strdup("default");
|
||||
if ((!bd->lock_border) || (!bd->client.border.name))
|
||||
{
|
||||
if (bd->client.border.name) free(bd->client.border.name);
|
||||
if (bd->client.mwm.borderless)
|
||||
bd->client.border.name = strdup("borderless");
|
||||
else
|
||||
bd->client.border.name = strdup("default");
|
||||
// if (bd->client.mwm.borderless)
|
||||
// printf("client %s borderless\n", bd->client.icccm.title);
|
||||
bd->client.border.changed = 1;
|
||||
bd->client.border.changed = 1;
|
||||
}
|
||||
}
|
||||
bd->client.mwm.fetch.hints = 0;
|
||||
}
|
||||
|
@ -4512,7 +4553,10 @@ _e_border_eval(E_Border *bd)
|
|||
if (bd->take_focus)
|
||||
{
|
||||
if (e_config->focus_setting == E_FOCUS_NEW_WINDOW)
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
{
|
||||
if (!bd->lock_focus_out)
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bd->client.icccm.transient_for != 0)
|
||||
|
@ -4522,7 +4566,10 @@ _e_border_eval(E_Border *bd)
|
|||
((e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED) &&
|
||||
(e_border_find_by_client_window(bd->client.icccm.transient_for) ==
|
||||
e_border_focused_get())))
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
{
|
||||
if (!bd->lock_focus_out)
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
bd->take_focus = 0;
|
||||
|
@ -4931,94 +4978,121 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key)
|
|||
bd->border_menu = m;
|
||||
e_menu_post_deactivate_callback_set(m, _e_border_cb_border_menu_end, NULL);
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Close"));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_close, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/close"),
|
||||
"widgets/border/default/close");
|
||||
if (!bd->lock_close)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Close"));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_close, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/close"),
|
||||
"widgets/border/default/close");
|
||||
}
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Iconify"));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_iconify, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/minimize"),
|
||||
"widgets/border/default/minimize");
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_separator_set(mi, 1);
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Kill"));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_kill, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/kill"),
|
||||
"widgets/border/default/kill");
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_separator_set(mi, 1);
|
||||
if (!bd->lock_user_iconify)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Iconify"));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_iconify, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/minimize"),
|
||||
"widgets/border/default/minimize");
|
||||
}
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Shaded"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, (bd->shaded ? 1 : 0));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_shade, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/shade"),
|
||||
"widgets/border/default/shade");
|
||||
e_menu_item_separator_set(mi, 1);
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Maximized"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, (bd->maximized ? 1 : 0));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_maximize, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/maximize"),
|
||||
"widgets/border/default/maximize");
|
||||
if (!bd->lock_close)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Kill"));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_kill, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/kill"),
|
||||
"widgets/border/default/kill");
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_separator_set(mi, 1);
|
||||
}
|
||||
|
||||
if (!bd->lock_user_shade)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Shaded"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, (bd->shaded ? 1 : 0));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_shade, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/shade"),
|
||||
"widgets/border/default/shade");
|
||||
}
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Sticky"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, (bd->sticky ? 1 : 0));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_stick, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/stick"),
|
||||
"widgets/border/default/stick");
|
||||
if (!bd->lock_user_maximize)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Maximized"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, (bd->maximized ? 1 : 0));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_maximize, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/maximize"),
|
||||
"widgets/border/default/maximize");
|
||||
}
|
||||
|
||||
if (!bd->lock_user_sticky)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Sticky"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, (bd->sticky ? 1 : 0));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_stick, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/stick"),
|
||||
"widgets/border/default/stick");
|
||||
}
|
||||
|
||||
if (!bd->lock_user_stacking)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Always On Top"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, (bd->layer == 150 ? 1 : 0));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_on_top, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/on_top"),
|
||||
"widgets/border/default/on_top");
|
||||
}
|
||||
|
||||
if (!bd->lock_border)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Borderless"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, !strcmp("borderless", bd->client.border.name));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_borderless, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/borderless"),
|
||||
"widgets/border/default/borderless");
|
||||
}
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Always On Top"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, (bd->layer == 150 ? 1 : 0));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_on_top, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/on_top"),
|
||||
"widgets/border/default/on_top");
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Borderless"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, !strcmp("borderless", bd->client.border.name));
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_borderless, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/borderless"),
|
||||
"widgets/border/default/borderless");
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Fullscreen"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, bd->fullscreen);
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_fullscreen, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/fullscreen"),
|
||||
"widgets/border/default/fullscreen");
|
||||
if (!bd->lock_user_fullscreen)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Fullscreen"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
e_menu_item_toggle_set(mi, bd->fullscreen);
|
||||
e_menu_item_callback_set(mi, _e_border_menu_cb_fullscreen, bd);
|
||||
e_menu_item_icon_edje_set(mi,
|
||||
(char *)e_theme_edje_file_get("base/theme/borders",
|
||||
"widgets/border/default/fullscreen"),
|
||||
"widgets/border/default/fullscreen");
|
||||
}
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_separator_set(mi, 1);
|
||||
|
@ -5101,7 +5175,8 @@ _e_border_menu_cb_close(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
E_Border *bd;
|
||||
|
||||
bd = data;
|
||||
e_border_act_close_begin(bd);
|
||||
if (!bd->lock_close)
|
||||
e_border_act_close_begin(bd);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5110,8 +5185,11 @@ _e_border_menu_cb_iconify(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
E_Border *bd;
|
||||
|
||||
bd = data;
|
||||
if (bd->iconic) e_border_uniconify(bd);
|
||||
else e_border_iconify(bd);
|
||||
if (!bd->lock_user_iconify)
|
||||
{
|
||||
if (bd->iconic) e_border_uniconify(bd);
|
||||
else e_border_iconify(bd);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5120,7 +5198,8 @@ _e_border_menu_cb_kill(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
E_Border *bd;
|
||||
|
||||
bd = data;
|
||||
e_border_act_kill_begin(bd);
|
||||
if (!bd->lock_close)
|
||||
e_border_act_kill_begin(bd);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5129,8 +5208,11 @@ _e_border_menu_cb_maximize(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
E_Border *bd;
|
||||
|
||||
bd = data;
|
||||
if (bd->maximized) e_border_unmaximize(bd);
|
||||
else e_border_maximize(bd, e_config->maximize_policy);
|
||||
if (!bd->lock_user_maximize)
|
||||
{
|
||||
if (bd->maximized) e_border_unmaximize(bd);
|
||||
else e_border_maximize(bd, e_config->maximize_policy);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5139,8 +5221,11 @@ _e_border_menu_cb_shade(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
E_Border *bd;
|
||||
|
||||
bd = data;
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_UP);
|
||||
else e_border_shade(bd, E_DIRECTION_UP);
|
||||
if (!bd->lock_user_shade)
|
||||
{
|
||||
if (bd->shaded) e_border_unshade(bd, E_DIRECTION_UP);
|
||||
else e_border_shade(bd, E_DIRECTION_UP);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5171,8 +5256,11 @@ _e_border_menu_cb_stick(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
E_Border *bd;
|
||||
|
||||
bd = data;
|
||||
if (bd->sticky) e_border_unstick(bd);
|
||||
else e_border_stick(bd);
|
||||
if (!bd->lock_user_sticky)
|
||||
{
|
||||
if (bd->sticky) e_border_unstick(bd);
|
||||
else e_border_stick(bd);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5226,11 +5314,14 @@ _e_border_menu_cb_fullscreen(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
bd = data;
|
||||
if (!bd) return;
|
||||
|
||||
toggle = e_menu_item_toggle_get(mi);
|
||||
if (toggle)
|
||||
e_border_fullscreen(bd);
|
||||
else
|
||||
e_border_unfullscreen(bd);
|
||||
if (!bd->lock_user_fullscreen)
|
||||
{
|
||||
toggle = e_menu_item_toggle_get(mi);
|
||||
if (toggle)
|
||||
e_border_fullscreen(bd);
|
||||
else
|
||||
e_border_unfullscreen(bd);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5481,7 +5572,8 @@ _e_border_resize_begin(E_Border *bd)
|
|||
{
|
||||
int w, h;
|
||||
|
||||
e_border_raise(bd);
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
if ((bd->shaded) || (bd->shading) || (bd->maximized) || (bd->fullscreen) ||
|
||||
(bd->lock_user_size))
|
||||
return 0;
|
||||
|
@ -5554,7 +5646,8 @@ _e_border_resize_update(E_Border *bd)
|
|||
static int
|
||||
_e_border_move_begin(E_Border *bd)
|
||||
{
|
||||
e_border_raise(bd);
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
if ((bd->maximized) || (bd->fullscreen) || (bd->lock_user_location))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -286,28 +286,28 @@ struct _E_Border
|
|||
unsigned int take_focus : 1;
|
||||
E_Maximize maximized;
|
||||
|
||||
unsigned int lock_user_location : 1;
|
||||
unsigned int lock_client_location : 1;
|
||||
unsigned int lock_user_size : 1;
|
||||
unsigned int lock_client_size : 1;
|
||||
unsigned int lock_user_stacking : 1;
|
||||
unsigned int lock_client_stacking : 1;
|
||||
unsigned int lock_user_iconify : 1;
|
||||
unsigned int lock_client_iconify : 1;
|
||||
unsigned int lock_user_location : 1; /*DONE*/
|
||||
unsigned int lock_client_location : 1; /*DONE*/
|
||||
unsigned int lock_user_size : 1; /*DONE*/
|
||||
unsigned int lock_client_size : 1; /*DONE*/
|
||||
unsigned int lock_user_stacking : 1; /*DONE*/
|
||||
unsigned int lock_client_stacking : 1; /*DONE*/
|
||||
unsigned int lock_user_iconify : 1; /*DONE*/
|
||||
unsigned int lock_client_iconify : 1; /*DONE*/
|
||||
unsigned int lock_user_desk : 1;
|
||||
unsigned int lock_client_desk : 1;
|
||||
unsigned int lock_user_sticky : 1;
|
||||
unsigned int lock_client_sticky : 1;
|
||||
unsigned int lock_user_shade : 1;
|
||||
unsigned int lock_client_shade : 1;
|
||||
unsigned int lock_user_maximize : 1;
|
||||
unsigned int lock_client_mazimize : 1;
|
||||
unsigned int lock_user_fullscreen : 1;
|
||||
unsigned int lock_client_fullscreen : 1;
|
||||
unsigned int lock_border : 1;
|
||||
unsigned int lock_close : 1;
|
||||
unsigned int lock_focus_in : 1;
|
||||
unsigned int lock_focus_out : 1;
|
||||
unsigned int lock_user_sticky : 1; /*DONE*/
|
||||
unsigned int lock_client_sticky : 1; /*DONE*/
|
||||
unsigned int lock_user_shade : 1; /*DONE*/
|
||||
unsigned int lock_client_shade : 1; /*DONE*/
|
||||
unsigned int lock_user_maximize : 1; /*DONE*/
|
||||
unsigned int lock_client_mazimize : 1; /*DONE*/
|
||||
unsigned int lock_user_fullscreen : 1; /*DONE*/
|
||||
unsigned int lock_client_fullscreen : 1; /*DONE*/
|
||||
unsigned int lock_border : 1; /*DONE*/
|
||||
unsigned int lock_close : 1; /*DONE*/
|
||||
unsigned int lock_focus_in : 1; /*DONE*/
|
||||
unsigned int lock_focus_out : 1; /*DONE*/
|
||||
unsigned int lock_life : 1;
|
||||
|
||||
double ping;
|
||||
|
|
|
@ -32,13 +32,19 @@ e_focus_event_mouse_in(E_Border* bd)
|
|||
{
|
||||
if ((e_config->focus_policy == E_FOCUS_MOUSE) ||
|
||||
(e_config->focus_policy == E_FOCUS_SLOPPY))
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
{
|
||||
if (!bd->lock_focus_out)
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
}
|
||||
|
||||
bd->raise_timer = NULL;
|
||||
if (e_config->use_auto_raise)
|
||||
{
|
||||
if (e_config->auto_raise_delay == 0.0)
|
||||
e_border_raise(bd);
|
||||
{
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
}
|
||||
else
|
||||
bd->raise_timer = ecore_timer_add(e_config->auto_raise_delay, _e_focus_raise_timer, bd);
|
||||
}
|
||||
|
@ -48,7 +54,10 @@ void
|
|||
e_focus_event_mouse_out(E_Border* bd)
|
||||
{
|
||||
if (e_config->focus_policy == E_FOCUS_MOUSE)
|
||||
e_border_focus_set(bd, 0, 1);
|
||||
{
|
||||
if (!bd->lock_focus_in)
|
||||
e_border_focus_set(bd, 0, 1);
|
||||
}
|
||||
|
||||
if (bd->raise_timer)
|
||||
{
|
||||
|
@ -62,12 +71,15 @@ e_focus_event_mouse_down(E_Border* bd)
|
|||
{
|
||||
if (e_config->focus_policy == E_FOCUS_CLICK)
|
||||
{
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
e_border_raise(bd);
|
||||
if (!bd->lock_focus_out)
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
}
|
||||
else if (e_config->always_click_to_raise)
|
||||
{
|
||||
e_border_raise(bd);
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +168,11 @@ e_focus_setdown(E_Border *bd)
|
|||
static int
|
||||
_e_focus_raise_timer(void* data)
|
||||
{
|
||||
e_border_raise((E_Border*)data);
|
||||
((E_Border*)data)->raise_timer = NULL;
|
||||
E_Border *bd;
|
||||
|
||||
bd = data;
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
bd->raise_timer = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -471,367 +471,368 @@ e_hints_window_state_update(E_Border *bd, Ecore_X_Window_State state,
|
|||
Ecore_X_Window_State_Action action)
|
||||
{
|
||||
int changed;
|
||||
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ICONIFIED:
|
||||
if (action != ECORE_X_WINDOW_STATE_ACTION_ADD) return;
|
||||
if (bd->client.icccm.state == ECORE_X_WINDOW_STATE_HINT_ICONIC) return;
|
||||
e_border_iconify(bd);
|
||||
break;
|
||||
if (action != ECORE_X_WINDOW_STATE_ACTION_ADD) return;
|
||||
if (bd->client.icccm.state == ECORE_X_WINDOW_STATE_HINT_ICONIC) return;
|
||||
if (!bd->lock_client_iconify)
|
||||
e_border_iconify(bd);
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_MODAL:
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.modal)
|
||||
{
|
||||
bd->client.netwm.state.modal = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.modal)
|
||||
{
|
||||
bd->client.netwm.state.modal = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.modal = !bd->client.netwm.state.modal;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
break;
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.modal)
|
||||
{
|
||||
bd->client.netwm.state.modal = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.modal)
|
||||
{
|
||||
bd->client.netwm.state.modal = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.modal = !bd->client.netwm.state.modal;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_STICKY:
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.sticky)
|
||||
{
|
||||
bd->client.netwm.state.sticky = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.sticky)
|
||||
{
|
||||
bd->client.netwm.state.sticky = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.sticky = !bd->client.netwm.state.sticky;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.sticky)
|
||||
e_border_stick(bd);
|
||||
else
|
||||
e_border_unstick(bd);
|
||||
}
|
||||
break;
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.sticky)
|
||||
{
|
||||
bd->client.netwm.state.sticky = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.sticky)
|
||||
{
|
||||
bd->client.netwm.state.sticky = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.sticky = !bd->client.netwm.state.sticky;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.sticky)
|
||||
e_border_stick(bd);
|
||||
else
|
||||
e_border_unstick(bd);
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_MAXIMIZED_VERT:
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.maximized_v)
|
||||
{
|
||||
bd->client.netwm.state.maximized_v = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.maximized_v)
|
||||
{
|
||||
bd->client.netwm.state.maximized_v = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.maximized_v = !bd->client.netwm.state.maximized_v;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if ((bd->client.netwm.state.maximized_v)
|
||||
&& (bd->client.netwm.state.maximized_h))
|
||||
e_border_maximize(bd, e_config->maximize_policy);
|
||||
else if ((!bd->client.netwm.state.maximized_v)
|
||||
&& (!bd->client.netwm.state.maximized_h))
|
||||
e_border_unmaximize(bd);
|
||||
}
|
||||
break;
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.maximized_v)
|
||||
{
|
||||
bd->client.netwm.state.maximized_v = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.maximized_v)
|
||||
{
|
||||
bd->client.netwm.state.maximized_v = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.maximized_v = !bd->client.netwm.state.maximized_v;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if ((bd->client.netwm.state.maximized_v)
|
||||
&& (bd->client.netwm.state.maximized_h))
|
||||
e_border_maximize(bd, e_config->maximize_policy);
|
||||
else if ((!bd->client.netwm.state.maximized_v)
|
||||
&& (!bd->client.netwm.state.maximized_h))
|
||||
e_border_unmaximize(bd);
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ:
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.maximized_h)
|
||||
{
|
||||
bd->client.netwm.state.maximized_h = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.maximized_h)
|
||||
{
|
||||
bd->client.netwm.state.maximized_h = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.maximized_h = !bd->client.netwm.state.maximized_h;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if ((bd->client.netwm.state.maximized_v)
|
||||
&& (bd->client.netwm.state.maximized_h))
|
||||
e_border_maximize(bd, e_config->maximize_policy);
|
||||
else if ((!bd->client.netwm.state.maximized_v)
|
||||
&& (!bd->client.netwm.state.maximized_h))
|
||||
e_border_unmaximize(bd);
|
||||
}
|
||||
break;
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.maximized_h)
|
||||
{
|
||||
bd->client.netwm.state.maximized_h = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.maximized_h)
|
||||
{
|
||||
bd->client.netwm.state.maximized_h = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.maximized_h = !bd->client.netwm.state.maximized_h;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if ((bd->client.netwm.state.maximized_v)
|
||||
&& (bd->client.netwm.state.maximized_h))
|
||||
e_border_maximize(bd, e_config->maximize_policy);
|
||||
else if ((!bd->client.netwm.state.maximized_v)
|
||||
&& (!bd->client.netwm.state.maximized_h))
|
||||
e_border_unmaximize(bd);
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_SHADED:
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.shaded)
|
||||
{
|
||||
bd->client.netwm.state.shaded = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.shaded)
|
||||
{
|
||||
bd->client.netwm.state.shaded = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.shaded = !bd->client.netwm.state.shaded;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.shaded)
|
||||
e_border_shade(bd, e_hints_window_shade_direction_get(bd));
|
||||
else
|
||||
e_border_unshade(bd, e_hints_window_shade_direction_get(bd));
|
||||
}
|
||||
break;
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.shaded)
|
||||
{
|
||||
bd->client.netwm.state.shaded = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.shaded)
|
||||
{
|
||||
bd->client.netwm.state.shaded = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.shaded = !bd->client.netwm.state.shaded;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.shaded)
|
||||
e_border_shade(bd, e_hints_window_shade_direction_get(bd));
|
||||
else
|
||||
e_border_unshade(bd, e_hints_window_shade_direction_get(bd));
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_SKIP_TASKBAR:
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.skip_taskbar)
|
||||
{
|
||||
bd->client.netwm.state.skip_taskbar = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.skip_taskbar)
|
||||
{
|
||||
bd->client.netwm.state.skip_taskbar = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.skip_taskbar = !bd->client.netwm.state.skip_taskbar;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
break;
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.skip_taskbar)
|
||||
{
|
||||
bd->client.netwm.state.skip_taskbar = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.skip_taskbar)
|
||||
{
|
||||
bd->client.netwm.state.skip_taskbar = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.skip_taskbar = !bd->client.netwm.state.skip_taskbar;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_SKIP_PAGER:
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.skip_pager)
|
||||
{
|
||||
bd->client.netwm.state.skip_pager = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.skip_pager)
|
||||
{
|
||||
bd->client.netwm.state.skip_pager = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.skip_pager = !bd->client.netwm.state.skip_pager;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
break;
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.skip_pager)
|
||||
{
|
||||
bd->client.netwm.state.skip_pager = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.skip_pager)
|
||||
{
|
||||
bd->client.netwm.state.skip_pager = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.skip_pager = !bd->client.netwm.state.skip_pager;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_HIDDEN:
|
||||
/* Ignore */
|
||||
break;
|
||||
/* Ignore */
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_FULLSCREEN:
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.fullscreen)
|
||||
{
|
||||
bd->client.netwm.state.fullscreen = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.fullscreen)
|
||||
{
|
||||
bd->client.netwm.state.fullscreen = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.fullscreen = !bd->client.netwm.state.fullscreen;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.fullscreen)
|
||||
e_border_fullscreen(bd);
|
||||
else
|
||||
e_border_unfullscreen(bd);
|
||||
}
|
||||
break;
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.fullscreen)
|
||||
{
|
||||
bd->client.netwm.state.fullscreen = 0;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (!bd->client.netwm.state.fullscreen)
|
||||
{
|
||||
bd->client.netwm.state.fullscreen = 1;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
bd->client.netwm.state.fullscreen = !bd->client.netwm.state.fullscreen;
|
||||
changed = 1;
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.fullscreen)
|
||||
e_border_fullscreen(bd);
|
||||
else
|
||||
e_border_unfullscreen(bd);
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ABOVE:
|
||||
/* FIXME: Should this require that BELOW is set to 0 first, or just
|
||||
* do it? */
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_ABOVE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_NONE;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_NONE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_ABOVE;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_ABOVE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_NONE;
|
||||
changed = 1;
|
||||
}
|
||||
else if (bd->client.netwm.state.stacking == E_STACKING_NONE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_ABOVE;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.stacking)
|
||||
bd->layer = 150;
|
||||
else
|
||||
bd->layer = 100;
|
||||
e_border_raise(bd);
|
||||
}
|
||||
break;
|
||||
/* FIXME: Should this require that BELOW is set to 0 first, or just
|
||||
* do it? */
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_ABOVE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_NONE;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_NONE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_ABOVE;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_ABOVE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_NONE;
|
||||
changed = 1;
|
||||
}
|
||||
else if (bd->client.netwm.state.stacking == E_STACKING_NONE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_ABOVE;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.stacking)
|
||||
bd->layer = 150;
|
||||
else
|
||||
bd->layer = 100;
|
||||
e_border_raise(bd);
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_BELOW:
|
||||
/* FIXME: Should this require that ABOVE is set to 0 first, or just
|
||||
* do it? */
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_BELOW)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_NONE;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_NONE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_BELOW;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_BELOW)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_NONE;
|
||||
changed = 1;
|
||||
}
|
||||
else if (bd->client.netwm.state.stacking == E_STACKING_NONE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_BELOW;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.stacking)
|
||||
bd->layer = 50;
|
||||
else
|
||||
bd->layer = 100;
|
||||
e_border_raise(bd);
|
||||
}
|
||||
break;
|
||||
/* FIXME: Should this require that ABOVE is set to 0 first, or just
|
||||
* do it? */
|
||||
changed = 0;
|
||||
switch (action)
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ACTION_REMOVE:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_BELOW)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_NONE;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_ADD:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_NONE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_BELOW;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ACTION_TOGGLE:
|
||||
if (bd->client.netwm.state.stacking == E_STACKING_BELOW)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_NONE;
|
||||
changed = 1;
|
||||
}
|
||||
else if (bd->client.netwm.state.stacking == E_STACKING_NONE)
|
||||
{
|
||||
bd->client.netwm.state.stacking = E_STACKING_BELOW;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
bd->client.netwm.update.state = 1;
|
||||
bd->changed = 1;
|
||||
if (bd->client.netwm.state.stacking)
|
||||
bd->layer = 50;
|
||||
else
|
||||
bd->layer = 100;
|
||||
e_border_raise(bd);
|
||||
}
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION:
|
||||
/* FIXME */
|
||||
break;
|
||||
/* FIXME */
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_UNKNOWN:
|
||||
/* Ignore */
|
||||
break;
|
||||
/* Ignore */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -860,47 +861,47 @@ e_hints_window_state_get(E_Border *bd)
|
|||
switch (state[i])
|
||||
{
|
||||
case ECORE_X_WINDOW_STATE_ICONIFIED:
|
||||
/* Ignore */
|
||||
break;
|
||||
/* Ignore */
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_MODAL:
|
||||
bd->client.netwm.state.modal = 1;
|
||||
break;
|
||||
bd->client.netwm.state.modal = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_STICKY:
|
||||
bd->client.netwm.state.sticky = 1;
|
||||
break;
|
||||
bd->client.netwm.state.sticky = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_MAXIMIZED_VERT:
|
||||
bd->client.netwm.state.maximized_v = 1;
|
||||
break;
|
||||
bd->client.netwm.state.maximized_v = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ:
|
||||
bd->client.netwm.state.maximized_h = 1;
|
||||
break;
|
||||
bd->client.netwm.state.maximized_h = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_SHADED:
|
||||
bd->client.netwm.state.shaded = 1;
|
||||
break;
|
||||
bd->client.netwm.state.shaded = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_SKIP_TASKBAR:
|
||||
bd->client.netwm.state.skip_taskbar = 1;
|
||||
break;
|
||||
bd->client.netwm.state.skip_taskbar = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_SKIP_PAGER:
|
||||
bd->client.netwm.state.skip_pager = 1;
|
||||
break;
|
||||
bd->client.netwm.state.skip_pager = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_HIDDEN:
|
||||
bd->client.netwm.state.hidden = 1;
|
||||
break;
|
||||
bd->client.netwm.state.hidden = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_FULLSCREEN:
|
||||
bd->client.netwm.state.fullscreen = 1;
|
||||
break;
|
||||
bd->client.netwm.state.fullscreen = 1;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_ABOVE:
|
||||
bd->client.netwm.state.stacking = E_STACKING_ABOVE;
|
||||
break;
|
||||
bd->client.netwm.state.stacking = E_STACKING_ABOVE;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_BELOW:
|
||||
bd->client.netwm.state.stacking = E_STACKING_BELOW;
|
||||
break;
|
||||
bd->client.netwm.state.stacking = E_STACKING_BELOW;
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION:
|
||||
/* FIXME */
|
||||
break;
|
||||
/* FIXME */
|
||||
break;
|
||||
case ECORE_X_WINDOW_STATE_UNKNOWN:
|
||||
/* Ignore */
|
||||
break;
|
||||
/* Ignore */
|
||||
break;
|
||||
}
|
||||
}
|
||||
free(state);
|
||||
|
|
|
@ -623,10 +623,16 @@ _e_int_menus_clients_item_cb(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
|
||||
bd = data;
|
||||
E_OBJECT_CHECK(bd);
|
||||
if (bd->iconic) e_border_uniconify(bd);
|
||||
if (bd->iconic)
|
||||
{
|
||||
if (!bd->lock_user_iconify)
|
||||
e_border_uniconify(bd);
|
||||
}
|
||||
e_desk_show(bd->desk);
|
||||
e_border_raise(bd);
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
if (!bd->lock_focus_out)
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -133,7 +133,11 @@ e_winlist_show(E_Zone *zone)
|
|||
}
|
||||
|
||||
bd = e_border_focused_get();
|
||||
if (bd) e_border_focus_set(bd, 0, 0);
|
||||
if (bd)
|
||||
{
|
||||
if (!bd->lock_focus_out)
|
||||
e_border_focus_set(bd, 0, 0);
|
||||
}
|
||||
_e_winlist_activate_nth(1);
|
||||
evas_event_thaw(winlist->evas);
|
||||
_e_winlist_size_adjust();
|
||||
|
@ -232,14 +236,24 @@ e_winlist_hide(void)
|
|||
}
|
||||
if (bd)
|
||||
{
|
||||
if (bd->iconic) e_border_uniconify(bd);
|
||||
if (bd->shaded) e_border_unshade(bd, bd->shade.dir);
|
||||
if (bd->iconic)
|
||||
{
|
||||
if (!bd->lock_user_iconify)
|
||||
e_border_uniconify(bd);
|
||||
}
|
||||
if (bd->shaded)
|
||||
{
|
||||
if (!bd->lock_user_shade)
|
||||
e_border_unshade(bd, bd->shade.dir);
|
||||
}
|
||||
else if (bd->desk)
|
||||
{
|
||||
if (!bd->sticky) e_desk_show(bd->desk);
|
||||
}
|
||||
e_border_raise(bd);
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
if (!bd->lock_user_stacking)
|
||||
e_border_raise(bd);
|
||||
if (!bd->lock_focus_in)
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
if ((e_config->focus_policy != E_FOCUS_CLICK) ||
|
||||
(e_config->winlist_warp_at_end) ||
|
||||
(e_config->winlist_warp_while_selecting))
|
||||
|
@ -474,7 +488,8 @@ _e_winlist_activate(void)
|
|||
if ((ww->border->iconic) &&
|
||||
(e_config->winlist_list_uncover_while_selecting))
|
||||
{
|
||||
e_border_uniconify(ww->border);
|
||||
if (!ww->border->lock_user_iconify)
|
||||
e_border_uniconify(ww->border);
|
||||
ww->was_iconified = 1;
|
||||
ok = 1;
|
||||
}
|
||||
|
@ -492,7 +507,8 @@ _e_winlist_activate(void)
|
|||
(ww->border->desk == e_desk_current_get(winlist->zone)) &&
|
||||
(e_config->winlist_list_uncover_while_selecting))
|
||||
{
|
||||
e_border_unshade(ww->border, ww->border->shade.dir);
|
||||
if (!ww->border->lock_user_shade)
|
||||
e_border_unshade(ww->border, ww->border->shade.dir);
|
||||
ww->was_shaded = 1;
|
||||
ok = 1;
|
||||
}
|
||||
|
@ -513,8 +529,10 @@ _e_winlist_activate(void)
|
|||
if (!animator)
|
||||
animator = ecore_animator_add(_e_winlist_animator, NULL);
|
||||
}
|
||||
e_border_raise(ww->border);
|
||||
e_border_focus_set(ww->border, 1, 1);
|
||||
if (!ww->border->lock_user_stacking)
|
||||
e_border_raise(ww->border);
|
||||
if (!ww->border->lock_focus_out)
|
||||
e_border_focus_set(ww->border, 1, 1);
|
||||
}
|
||||
if (ww->border->client.netwm.name)
|
||||
edje_object_part_text_set(bg_object, "title_text", ww->border->client.netwm.name);
|
||||
|
@ -544,9 +562,15 @@ _e_winlist_deactivate(void)
|
|||
if (!win_selected) return;
|
||||
ww = win_selected->data;
|
||||
if (ww->was_shaded)
|
||||
e_border_shade(ww->border, ww->border->shade.dir);
|
||||
{
|
||||
if (!ww->border->lock_user_shade)
|
||||
e_border_shade(ww->border, ww->border->shade.dir);
|
||||
}
|
||||
if (ww->was_iconified)
|
||||
e_border_iconify(ww->border);
|
||||
{
|
||||
if (!ww->border->lock_user_iconify)
|
||||
e_border_iconify(ww->border);
|
||||
}
|
||||
ww->was_shaded = 0;
|
||||
ww->was_iconified = 0;
|
||||
if (icon_object)
|
||||
|
@ -556,7 +580,8 @@ _e_winlist_deactivate(void)
|
|||
}
|
||||
edje_object_part_text_set(bg_object, "title_text", "");
|
||||
edje_object_signal_emit(ww->bg_object, "passive", "");
|
||||
e_border_focus_set(ww->border, 0, 0);
|
||||
if (!ww->border->lock_focus_in)
|
||||
e_border_focus_set(ww->border, 0, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue