sessionMode: add a property to disable window manager menus
We will use this to disable menus in the initial-setup session. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/569
This commit is contained in:
parent
3cbdf4f9a5
commit
3b6fae582b
@ -25,6 +25,7 @@ const _modes = {
|
|||||||
hasWorkspaces: false,
|
hasWorkspaces: false,
|
||||||
hasWindows: false,
|
hasWindows: false,
|
||||||
hasNotifications: false,
|
hasNotifications: false,
|
||||||
|
hasWmMenus: false,
|
||||||
isLocked: false,
|
isLocked: false,
|
||||||
isGreeter: false,
|
isGreeter: false,
|
||||||
isPrimary: false,
|
isPrimary: false,
|
||||||
@ -86,6 +87,7 @@ const _modes = {
|
|||||||
hasRunDialog: true,
|
hasRunDialog: true,
|
||||||
hasWorkspaces: true,
|
hasWorkspaces: true,
|
||||||
hasWindows: true,
|
hasWindows: true,
|
||||||
|
hasWmMenus: true,
|
||||||
hasNotifications: true,
|
hasNotifications: true,
|
||||||
isLocked: false,
|
isLocked: false,
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
|
@ -203,6 +203,9 @@ var WindowMenuManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
showWindowMenuForWindow(window, type, rect) {
|
showWindowMenuForWindow(window, type, rect) {
|
||||||
|
if (!Main.sessionMode.hasWmMenus)
|
||||||
|
return;
|
||||||
|
|
||||||
if (type != Meta.WindowMenuType.WM)
|
if (type != Meta.WindowMenuType.WM)
|
||||||
throw new Error('Unsupported window menu type');
|
throw new Error('Unsupported window menu type');
|
||||||
let menu = new WindowMenu(window, this._sourceActor);
|
let menu = new WindowMenu(window, this._sourceActor);
|
||||||
|
Loading…
Reference in New Issue
Block a user