screenshot-ui: Extract binding modes
We will re-use the same modes for more bindings in subsequent commits. Also, while we're at it, invert the modes, to emphasize where the screenshot UI cannot be used, rather than where it can be used. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2107>
This commit is contained in:
parent
5a18f00fa6
commit
414592acf9
@ -1275,15 +1275,17 @@ var ScreenshotUI = GObject.registerClass({
|
|||||||
this._rebuildMonitorBins();
|
this._rebuildMonitorBins();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const uiModes =
|
||||||
|
Shell.ActionMode.ALL &
|
||||||
|
~(Shell.ActionMode.LOCK_SCREEN |
|
||||||
|
Shell.ActionMode.UNLOCK_SCREEN |
|
||||||
|
Shell.ActionMode.LOGIN_SCREEN);
|
||||||
|
|
||||||
Main.wm.addKeybinding(
|
Main.wm.addKeybinding(
|
||||||
'show-screenshot-ui',
|
'show-screenshot-ui',
|
||||||
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
|
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
|
||||||
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
|
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
|
||||||
Shell.ActionMode.NORMAL |
|
uiModes,
|
||||||
Shell.ActionMode.OVERVIEW |
|
|
||||||
Shell.ActionMode.SYSTEM_MODAL |
|
|
||||||
Shell.ActionMode.LOOKING_GLASS |
|
|
||||||
Shell.ActionMode.POPUP,
|
|
||||||
showScreenshotUI
|
showScreenshotUI
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user