mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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.
This commit is contained in:
parent
6770329e69
commit
40a710dad0
@ -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
|
||||
|
24
src/window.c
24
src/window.c
@ -5711,14 +5711,17 @@ 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;
|
||||
@ -5763,6 +5766,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,
|
||||
window->xwindow,
|
||||
|
Loading…
Reference in New Issue
Block a user