summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-09 13:11:26 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-09 13:11:26 -0500
commit9ffef78188b523a3de594a1e99f8f8973ce872fe (patch)
tree227448ef07f2da10a4cd38c9c928e9c441127277
parentfe4cd157823be2618f14a0d2415c33496e5d8142 (diff)
disable client menu stacking functions for unstackable windows
any client stacked higher than E_LAYER_CLIENT_ABOVE should never be user-stacked
-rw-r--r--src/bin/e_int_client_menu.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/bin/e_int_client_menu.c b/src/bin/e_int_client_menu.c
index f8508a7c7..f2a1df1b6 100644
--- a/src/bin/e_int_client_menu.c
+++ b/src/bin/e_int_client_menu.c
@@ -156,18 +156,21 @@ e_int_client_menu_create(E_Client *ec)
156 e_menu_item_submenu_pre_callback_set(mi, _e_client_menu_cb_align_pre, ec); 156 e_menu_item_submenu_pre_callback_set(mi, _e_client_menu_cb_align_pre, ec);
157 } 157 }
158 158
159 mi = e_menu_item_new(m); 159 if (ec->layer <= E_LAYER_CLIENT_ABOVE)
160 e_menu_item_label_set(mi, _("Always on Top")); 160 {
161 e_menu_item_check_set(mi, 1); 161 mi = e_menu_item_new(m);
162 e_menu_item_toggle_set(mi, (ec->layer == E_LAYER_CLIENT_ABOVE ? 1 : 0)); 162 e_menu_item_label_set(mi, _("Always on Top"));
163 if (ec->layer == E_LAYER_CLIENT_ABOVE) 163 e_menu_item_check_set(mi, 1);
164 e_menu_item_callback_set(mi, _e_client_menu_cb_normal, ec); 164 e_menu_item_toggle_set(mi, (ec->layer == E_LAYER_CLIENT_ABOVE ? 1 : 0));
165 else 165 if (ec->layer == E_LAYER_CLIENT_ABOVE)
166 e_menu_item_callback_set(mi, _e_client_menu_cb_on_top, ec); 166 e_menu_item_callback_set(mi, _e_client_menu_cb_normal, ec);
167 e_menu_item_icon_edje_set(mi, 167 else
168 e_theme_edje_file_get("base/theme/borders", 168 e_menu_item_callback_set(mi, _e_client_menu_cb_on_top, ec);
169 "e/widgets/border/default/stack_on_top"), 169 e_menu_item_icon_edje_set(mi,
170 "e/widgets/border/default/stack_on_top"); 170 e_theme_edje_file_get("base/theme/borders",
171 "e/widgets/border/default/stack_on_top"),
172 "e/widgets/border/default/stack_on_top");
173 }
171 174
172 if (!ec->lock_user_sticky) 175 if (!ec->lock_user_sticky)
173 { 176 {
@@ -790,7 +793,7 @@ _e_client_menu_cb_window_pre(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi)
790 submi = e_menu_item_new(subm); 793 submi = e_menu_item_new(subm);
791 e_menu_item_separator_set(submi, 1); 794 e_menu_item_separator_set(submi, 1);
792 795
793 if ((!ec->lock_user_stacking) && (!ec->fullscreen)) 796 if ((!ec->lock_user_stacking) && (!ec->fullscreen) && (ec->layer <= E_LAYER_CLIENT_ABOVE))
794 { 797 {
795 submi = e_menu_item_new(subm); 798 submi = e_menu_item_new(subm);
796 e_menu_item_label_set(submi, _("Stacking")); 799 e_menu_item_label_set(submi, _("Stacking"));