#! /bin/sh /usr/share/dpatch/dpatch-run ## 99_switch_desktop_support.dpatch by Sun Zhigang . ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Double press Ctrl-Alt-Left or Ctrl-Alt-Right to switch desktop. ## DP: But doesn't work in fullscreen mode. @DPATCH@ diff -urN rdesktop.orig/xkeymap.c rdesktop/xkeymap.c --- rdesktop.orig/xkeymap.c 2009-10-06 10:46:19.000000000 +0800 +++ rdesktop/xkeymap.c 2009-10-06 10:48:11.000000000 +0800 @@ -597,6 +597,22 @@ ui_seamless_toggle(); break; + /* Patch by sunner@gmail.com */ + case XK_Left: + case XK_Right: + if ((get_key_state(state, XK_Alt_L) || get_key_state(state, XK_Alt_R)) + && (get_key_state(state, XK_Control_L) + || get_key_state(state, XK_Control_R))) + { + /* Ctrl-Alt-Left & Ctrl-Alt-Right: + * Ungrab the keyboard so that user can use + * Windows manager's hot keys */ + XUngrabKeyboard(g_display, CurrentTime); + return True; + } + break; + /* Patch over */ + } return False; }