[gnome-settings-daemon] media-keys: Disallow screenshots when locked



commit e6e81aea689c03206ec0c6125adc1461c7eba133
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Oct 7 11:57:31 2014 +0200

    media-keys: Disallow screenshots when locked
    
    Allowing random people to create files in the user's home folder
    while the screen is locked is unexpected at best, so block the
    corresponding shortcuts (while still allowing taking screenshots
    to the clipboard for bug reports/reviews etc.).
    While at it, adjust the shortcut for screencasts as well (though
    the change their is purely informational, as screencasts are already
    blocked by the shell while locked).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737456

 plugins/media-keys/shortcuts-list.h |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/plugins/media-keys/shortcuts-list.h b/plugins/media-keys/shortcuts-list.h
index 20e1c9d..de9fde2 100644
--- a/plugins/media-keys/shortcuts-list.h
+++ b/plugins/media-keys/shortcuts-list.h
@@ -27,6 +27,7 @@
 #define GSD_KEYBINDING_MODE_LAUNCHER (SHELL_KEYBINDING_MODE_NORMAL | \
                                       SHELL_KEYBINDING_MODE_OVERVIEW)
 #define SCREENSAVER_MODE SHELL_KEYBINDING_MODE_ALL & ~SHELL_KEYBINDING_MODE_UNLOCK_SCREEN
+#define NO_LOCK_MODE SCREENSAVER_MODE & ~SHELL_KEYBINDING_MODE_LOCK_SCREEN
 #define POWER_KEYS_MODE (SHELL_KEYBINDING_MODE_NORMAL | \
                         SHELL_KEYBINDING_MODE_OVERVIEW | \
                         SHELL_KEYBINDING_MODE_LOGIN_SCREEN)
@@ -62,13 +63,13 @@ static struct {
         { SCREENSAVER_KEY, "screensaver", NULL, NULL, SCREENSAVER_MODE },
         { SCREENSAVER_KEY, NULL, N_("Lock Screen"), "XF86ScreenSaver", SCREENSAVER_MODE },
         { HELP_KEY, "help", NULL, NULL, GSD_KEYBINDING_MODE_LAUNCHER },
-        { SCREENSHOT_KEY, "screenshot", NULL, NULL, SHELL_KEYBINDING_MODE_ALL },
-        { WINDOW_SCREENSHOT_KEY, "window-screenshot", NULL, NULL, SHELL_KEYBINDING_MODE_NORMAL },
-        { AREA_SCREENSHOT_KEY, "area-screenshot", NULL, NULL, SHELL_KEYBINDING_MODE_ALL },
+        { SCREENSHOT_KEY, "screenshot", NULL, NULL, NO_LOCK_MODE },
+        { WINDOW_SCREENSHOT_KEY, "window-screenshot", NULL, NULL, NO_LOCK_MODE },
+        { AREA_SCREENSHOT_KEY, "area-screenshot", NULL, NULL, NO_LOCK_MODE },
         { SCREENSHOT_CLIP_KEY, "screenshot-clip", NULL, NULL, SHELL_KEYBINDING_MODE_ALL },
         { WINDOW_SCREENSHOT_CLIP_KEY, "window-screenshot-clip", NULL, NULL, SHELL_KEYBINDING_MODE_NORMAL },
         { AREA_SCREENSHOT_CLIP_KEY, "area-screenshot-clip", NULL, NULL, SHELL_KEYBINDING_MODE_ALL },
-        { SCREENCAST_KEY, "screencast", NULL, NULL, SHELL_KEYBINDING_MODE_ALL },
+        { SCREENCAST_KEY, "screencast", NULL, NULL, NO_LOCK_MODE },
         { WWW_KEY, "www", NULL, NULL, GSD_KEYBINDING_MODE_LAUNCHER },
         { PLAY_KEY, "play", NULL, NULL, SHELL_KEYBINDING_MODE_ALL },
         { PAUSE_KEY, "pause", NULL, NULL, SHELL_KEYBINDING_MODE_ALL },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]