debian/patches: Drop 0001_new_video_key.patch. Rejected upstream.

This commit is contained in:
Martin Wimpress
2020-02-12 17:25:43 +00:00
parent b5c7c62bcc
commit 7f5494f18a
2 changed files with 0 additions and 92 deletions

View File

@ -1,91 +0,0 @@
Author: Martin Wimpress <code@flexion.org>
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;

View File

@ -1,2 +1 @@
0001_new_video_key.patch
1001_RDA-Don-t-apply-stored-monitor-configuration-if-sess.patch