Only show workspace and stick/unstick in menu item for primary monitor
If workspaces_only_on_primary then it makes no sense to have these menu items on the monitors where workspaces don't take any effect. https://bugzilla.gnome.org/show_bug.cgi?id=609258
This commit is contained in:
parent
74b97dcd14
commit
637cce0f91
@ -7666,6 +7666,9 @@ meta_window_show_menu (MetaWindow *window,
|
|||||||
window->type != META_WINDOW_DESKTOP)
|
window->type != META_WINDOW_DESKTOP)
|
||||||
ops |= META_MENU_OP_RECOVER;
|
ops |= META_MENU_OP_RECOVER;
|
||||||
|
|
||||||
|
if (!meta_prefs_get_workspaces_only_on_primary () ||
|
||||||
|
meta_window_is_on_primary_monitor (window))
|
||||||
|
{
|
||||||
n_workspaces = meta_screen_get_n_workspaces (window->screen);
|
n_workspaces = meta_screen_get_n_workspaces (window->screen);
|
||||||
|
|
||||||
if (n_workspaces > 1)
|
if (n_workspaces > 1)
|
||||||
@ -7694,6 +7697,10 @@ meta_window_show_menu (MetaWindow *window,
|
|||||||
|
|
||||||
meta_screen_free_workspace_layout (&layout);
|
meta_screen_free_workspace_layout (&layout);
|
||||||
|
|
||||||
|
ops |= META_MENU_OP_UNSTICK;
|
||||||
|
ops |= META_MENU_OP_STICK;
|
||||||
|
}
|
||||||
|
|
||||||
if (META_WINDOW_MAXIMIZED (window))
|
if (META_WINDOW_MAXIMIZED (window))
|
||||||
ops |= META_MENU_OP_UNMAXIMIZE;
|
ops |= META_MENU_OP_UNMAXIMIZE;
|
||||||
else
|
else
|
||||||
@ -7706,9 +7713,6 @@ meta_window_show_menu (MetaWindow *window,
|
|||||||
ops |= META_MENU_OP_SHADE;
|
ops |= META_MENU_OP_SHADE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ops |= META_MENU_OP_UNSTICK;
|
|
||||||
ops |= META_MENU_OP_STICK;
|
|
||||||
|
|
||||||
if (window->wm_state_above)
|
if (window->wm_state_above)
|
||||||
ops |= META_MENU_OP_UNABOVE;
|
ops |= META_MENU_OP_UNABOVE;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user