Commit 3b6fae58 authored by Cosimo Cecchi's avatar Cosimo Cecchi Committed by Georges Basile Stavracas Neto

sessionMode: add a property to disable window manager menus

We will use this to disable menus in the initial-setup session.

!569
parent 3cbdf4f9
Pipeline #86610 passed with stages
in 3 minutes and 15 seconds
......@@ -25,6 +25,7 @@ const _modes = {
hasWorkspaces: false,
hasWindows: false,
hasNotifications: false,
hasWmMenus: false,
isLocked: false,
isGreeter: false,
isPrimary: false,
......@@ -86,6 +87,7 @@ const _modes = {
hasRunDialog: true,
hasWorkspaces: true,
hasWindows: true,
hasWmMenus: true,
hasNotifications: true,
isLocked: false,
isPrimary: true,
......
......@@ -203,6 +203,9 @@ var WindowMenuManager = class {
}
showWindowMenuForWindow(window, type, rect) {
if (!Main.sessionMode.hasWmMenus)
return;
if (type != Meta.WindowMenuType.WM)
throw new Error('Unsupported window menu type');
let menu = new WindowMenu(window, this._sourceActor);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment