[gnome-shell] screenshot: Allow some shortcuts on lock screen
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenshot: Allow some shortcuts on lock screen
- Date: Mon, 22 Aug 2022 14:18:42 +0000 (UTC)
commit 6db6db8a6b613439f4b3b2bbab43a54e920a5de4
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Aug 21 21:17:18 2022 +0200
screenshot: Allow some shortcuts on lock screen
We will expose the screenshot UI from quick settings, including
on the lock screen. It would be odd to restrict keyboard shortcuts
more than the more accessible UI, so relax the modes for the
screenshot-ui and screen-screenshot shortcuts.
We still disable all screenshot shortcuts on the login screen, as
users don't have an obvious way to retrieve the screenshot files.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2439>
js/ui/screenshot.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index e6ead61273..d43bf0dc7f 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -1285,10 +1285,10 @@ var ScreenshotUI = GObject.registerClass({
});
const uiModes =
- Shell.ActionMode.ALL &
- ~(Shell.ActionMode.LOCK_SCREEN |
- Shell.ActionMode.UNLOCK_SCREEN |
- Shell.ActionMode.LOGIN_SCREEN);
+ Shell.ActionMode.ALL & ~Shell.ActionMode.LOGIN_SCREEN;
+ const restrictedModes =
+ uiModes &
+ ~(Shell.ActionMode.LOCK_SCREEN | Shell.ActionMode.UNLOCK_SCREEN);
Main.wm.addKeybinding(
'show-screenshot-ui',
@@ -1302,7 +1302,7 @@ var ScreenshotUI = GObject.registerClass({
'show-screen-recording-ui',
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
- uiModes,
+ restrictedModes,
showScreenRecordingUI
);
@@ -1310,7 +1310,7 @@ var ScreenshotUI = GObject.registerClass({
'screenshot-window',
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT | Meta.KeyBindingFlags.PER_WINDOW,
- uiModes,
+ restrictedModes,
async (_display, window, _binding) => {
try {
const actor = window.get_compositor_private();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]