From 7f5494f18a75bbbe3913d693ddcd49932acf1dc9 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 12 Feb 2020 17:25:43 +0000 Subject: [PATCH] debian/patches: Drop 0001_new_video_key.patch. Rejected upstream. --- debian/patches/0001_new_video_key.patch | 91 ------------------------- debian/patches/series | 1 - 2 files changed, 92 deletions(-) delete mode 100644 debian/patches/0001_new_video_key.patch diff --git a/debian/patches/0001_new_video_key.patch b/debian/patches/0001_new_video_key.patch deleted file mode 100644 index 834f322..0000000 --- a/debian/patches/0001_new_video_key.patch +++ /dev/null @@ -1,91 +0,0 @@ -Author: Martin Wimpress -Description: Have "Super+P" trigger a video mode switch. - -diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c -index fff0c9b..cf66863 100644 ---- a/plugins/xrandr/msd-xrandr-manager.c -+++ b/plugins/xrandr/msd-xrandr-manager.c -@@ -64,6 +64,8 @@ - - #define VIDEO_KEYSYM "XF86Display" - #define ROTATE_KEYSYM "XF86RotateWindows" -+#define NEW_VIDEO_KEYSYM "p" -+#define NEW_VIDEO_MODSYM Mod4Mask - - /* Number of seconds that the confirmation dialog will last before it resets the - * RANDR configuration to its old state. -@@ -88,6 +90,11 @@ struct MsdXrandrManagerPrivate - /* Key code of the XF86Display key (Fn-F7 on Thinkpads, Fn-F4 on HP machines, etc.) */ - guint switch_video_mode_keycode; - -+ /* Key code of a new video mode key (F1 on Dell machines). -+ It looks like Mod4+P. */ -+ guint new_switch_video_mode_keycode; -+ guint new_switch_video_mode_modifier; -+ - /* Key code of the XF86RotateWindows key (present on some tablets) */ - guint rotate_windows_keycode; - -@@ -1374,7 +1381,9 @@ event_filter (GdkXEvent *xevent, - return GDK_FILTER_CONTINUE; - - if (xev->xany.type == KeyPress) { -- if (xev->xkey.keycode == manager->priv->switch_video_mode_keycode) -+ if (xev->xkey.keycode == manager->priv->switch_video_mode_keycode || -+ (xev->xkey.keycode == manager->priv->new_switch_video_mode_keycode && -+ xev->xkey.state & manager->priv->new_switch_video_mode_modifier)) - handle_fn_f7 (manager, xev->xkey.time); - else if (xev->xkey.keycode == manager->priv->rotate_windows_keycode) - handle_rotate_windows (manager, xev->xkey.time); -@@ -2574,6 +2583,21 @@ msd_xrandr_manager_start (MsdXrandrManager *manager, - gdk_x11_display_error_trap_pop_ignored (display); - } - -+ if (manager->priv->new_switch_video_mode_keycode && -+ manager->priv->new_switch_video_mode_modifier) { -+ gdk_x11_display_error_trap_push (display); -+ -+ XGrabKey (gdk_x11_get_default_xdisplay(), -+ manager->priv->new_switch_video_mode_keycode, -+ manager->priv->new_switch_video_mode_modifier, -+ gdk_x11_get_default_root_xwindow(), -+ True, GrabModeAsync, GrabModeAsync); -+ -+ gdk_display_flush (display); -+ gdk_x11_display_error_trap_pop_ignored (display); -+ } -+ -+ - if (manager->priv->rotate_windows_keycode) { - gdk_x11_display_error_trap_push (display); - -@@ -2629,6 +2653,18 @@ msd_xrandr_manager_stop (MsdXrandrManager *manager) - gdk_x11_display_error_trap_pop_ignored (display); - } - -+ if (manager->priv->new_switch_video_mode_keycode && -+ manager->priv->new_switch_video_mode_modifier) { -+ gdk_x11_display_error_trap_push (display); -+ -+ XUngrabKey (gdk_x11_get_default_xdisplay(), -+ manager->priv->new_switch_video_mode_keycode, -+ manager->priv->new_switch_video_mode_modifier, -+ gdk_x11_get_default_root_xwindow()); -+ -+ gdk_x11_display_error_trap_pop_ignored (display); -+ } -+ - if (manager->priv->rotate_windows_keycode) { - gdk_x11_display_error_trap_push (display); - -@@ -2695,6 +2731,10 @@ msd_xrandr_manager_init (MsdXrandrManager *manager) - manager->priv = MSD_XRANDR_MANAGER_GET_PRIVATE (manager); - - manager->priv->switch_video_mode_keycode = get_keycode_for_keysym_name (VIDEO_KEYSYM); -+ manager->priv->new_switch_video_mode_keycode = get_keycode_for_keysym_name (NEW_VIDEO_KEYSYM); -+ manager->priv->new_switch_video_mode_modifier = NEW_VIDEO_MODSYM; -+ manager->priv->new_switch_video_mode_keycode = get_keycode_for_keysym_name (NEW_VIDEO_KEYSYM); -+ manager->priv->new_switch_video_mode_modifier = NEW_VIDEO_MODSYM; - manager->priv->rotate_windows_keycode = get_keycode_for_keysym_name (ROTATE_KEYSYM); - - manager->priv->current_fn_f7_config = -1; diff --git a/debian/patches/series b/debian/patches/series index 6ce1b9e..ce97527 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ -0001_new_video_key.patch 1001_RDA-Don-t-apply-stored-monitor-configuration-if-sess.patch