mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 7 additions and 5 deletions
|
|
@ -1275,15 +1275,17 @@ var ScreenshotUI = GObject.registerClass({
|
|||
this._rebuildMonitorBins();
|
||||
});
|
||||
|
||||
const uiModes =
|
||||
Shell.ActionMode.ALL &
|
||||
~(Shell.ActionMode.LOCK_SCREEN |
|
||||
Shell.ActionMode.UNLOCK_SCREEN |
|
||||
Shell.ActionMode.LOGIN_SCREEN);
|
||||
|
||||
Main.wm.addKeybinding(
|
||||
'show-screenshot-ui',
|
||||
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
|
||||
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
|
||||
Shell.ActionMode.NORMAL |
|
||||
Shell.ActionMode.OVERVIEW |
|
||||
Shell.ActionMode.SYSTEM_MODAL |
|
||||
Shell.ActionMode.LOOKING_GLASS |
|
||||
Shell.ActionMode.POPUP,
|
||||
uiModes,
|
||||
showScreenshotUI
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue