summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Adams <readams@readams.net>2004-01-17 18:57:26 +0000
committerRob Adams <readams@src.gnome.org>2004-01-17 18:57:26 +0000
commit40a710dad0dae640dec209bee8c7c227561db83b (patch)
tree054d91875349aae17a85b7eece7f19d0297d83db
parent6770329e6979201552a4e8a5094f9d88cdfd7197 (diff)
downloadmetacity-40a710dad0dae640dec209bee8c7c227561db83b.tar.gz
Don't show left/right/up/down if a window is sticky. Make "On Top"
2004-01-17 Rob Adams <readams@readams.net> * src/window.c (meta_window_show_menu): Don't show left/right/up/down if a window is sticky. Make "On Top" insensitive for docks, splash screens, and desktops since it has no effect anyway.
-rw-r--r--ChangeLog7
-rw-r--r--src/window.c28
2 files changed, 25 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 697372ec..c21911b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-17 Rob Adams <readams@readams.net>
+
+ * src/window.c (meta_window_show_menu): Don't show
+ left/right/up/down if a window is sticky. Make "On Top"
+ insensitive for docks, splash screens, and desktops since it has
+ no effect anyway.
+
2004-01-10 Rob Adams <readams@readams.net>
* src/metacity.schemas.in: update default
diff --git a/src/window.c b/src/window.c
index 100b158d..0ca2c29c 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5711,15 +5711,18 @@ meta_window_show_menu (MetaWindow *window,
meta_workspace_index ( window->screen->active_workspace),
&layout);
- if (layout.current_col > 0)
- ops |= META_MENU_OP_MOVE_LEFT;
- if (layout.current_col < layout.cols - 1)
- ops |= META_MENU_OP_MOVE_RIGHT;
- if (layout.current_row > 0)
- ops |= META_MENU_OP_MOVE_UP;
- if (layout.current_row < layout.rows - 1)
- ops |= META_MENU_OP_MOVE_DOWN;
-
+ if (!window->on_all_workspaces)
+ {
+ if (layout.current_col > 0)
+ ops |= META_MENU_OP_MOVE_LEFT;
+ if (layout.current_col < layout.cols - 1)
+ ops |= META_MENU_OP_MOVE_RIGHT;
+ if (layout.current_row > 0)
+ ops |= META_MENU_OP_MOVE_UP;
+ if (layout.current_row < layout.rows - 1)
+ ops |= META_MENU_OP_MOVE_DOWN;
+ }
+
if (window->maximized)
ops |= META_MENU_OP_UNMAXIMIZE;
else
@@ -5736,7 +5739,7 @@ meta_window_show_menu (MetaWindow *window,
ops |= META_MENU_OP_UNSTICK;
else
ops |= META_MENU_OP_STICK;
-
+
if (window->wm_state_above)
ops |= META_MENU_OP_UNABOVE;
else
@@ -5762,6 +5765,11 @@ meta_window_show_menu (MetaWindow *window,
if (window->always_sticky)
insensitive |= META_MENU_OP_UNSTICK | META_MENU_OP_WORKSPACES;
+
+ if ((window->type == META_WINDOW_DESKTOP) ||
+ (window->type == META_WINDOW_DOCK) ||
+ (window->type == META_WINDOW_SPLASHSCREEN))
+ insensitive |= META_MENU_OP_ABOVE | META_MENU_OP_UNABOVE;
menu =
meta_ui_window_menu_new (window->screen->ui,