[gnome-shell] screenshot-ui: Extract binding modes
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenshot-ui: Extract binding modes
- Date: Sat, 12 Feb 2022 12:23:53 +0000 (UTC)
commit 414592acf910573beaee6c7709b3052d398f1743
Author: Ivan Molodetskikh <yalterz gmail com>
Date: Thu Feb 3 22:40:23 2022 +0300
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>
js/ui/screenshot.js | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index ad81c55126..2b70d1d0cf 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -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
);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]