rdesktop-send_physical_buttons.diff 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ? aclocal.m4
  2. Index: rdesktop.c
  3. ===================================================================
  4. RCS file: /cvsroot/rdesktop/rdesktop/rdesktop.c,v
  5. retrieving revision 1.163
  6. diff -u -r1.163 rdesktop.c
  7. --- rdesktop.c 5 Apr 2008 06:15:45 -0000 1.163
  8. +++ rdesktop.c 5 Aug 2008 11:46:04 -0000
  9. @@ -73,6 +73,7 @@
  10. int g_win_button_size = 0; /* If zero, disable single app mode */
  11. RD_BOOL g_bitmap_compression = True;
  12. RD_BOOL g_sendmotion = True;
  13. +RD_BOOL g_send_physical_buttons = True;
  14. RD_BOOL g_bitmap_cache = True;
  15. RD_BOOL g_bitmap_cache_persist_enable = False;
  16. RD_BOOL g_bitmap_cache_precache = True;
  17. @@ -152,6 +153,7 @@
  18. fprintf(stderr, " -B: use BackingStore of X-server (if available)\n");
  19. fprintf(stderr, " -e: disable encryption (French TS)\n");
  20. fprintf(stderr, " -E: disable encryption from client to server\n");
  21. + fprintf(stderr, " -M: do not map logical mouse buttons to physical\n");
  22. fprintf(stderr, " -m: do not send motion events\n");
  23. fprintf(stderr, " -C: use private colour map\n");
  24. fprintf(stderr, " -D: hide window manager decorations\n");
  25. @@ -450,7 +452,7 @@
  26. #endif
  27. while ((c = getopt(argc, argv,
  28. - VNCOPT "A:u:L:d:s:c:p:n:k:g:o:fbBeEitmzCDKS:T:NX:a:x:Pr:045h?")) != -1)
  29. + VNCOPT "A:u:L:d:s:c:p:n:k:g:o:fbBeEitMmzCDKS:T:NX:a:x:Pr:045h?")) != -1)
  30. {
  31. switch (c)
  32. {
  33. @@ -584,6 +586,9 @@
  34. case 'E':
  35. g_packet_encryption = False;
  36. break;
  37. + case 'M':
  38. + g_send_physical_buttons = False;
  39. + break;
  40. case 'm':
  41. g_sendmotion = False;
  42. break;
  43. Index: xwin.c
  44. ===================================================================
  45. RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
  46. retrieving revision 1.235
  47. diff -u -r1.235 xwin.c
  48. --- xwin.c 11 Jul 2008 03:51:23 -0000 1.235
  49. +++ xwin.c 5 Aug 2008 11:46:06 -0000
  50. @@ -36,6 +36,7 @@
  51. extern int g_ypos;
  52. extern int g_pos;
  53. extern RD_BOOL g_sendmotion;
  54. +extern RD_BOOL g_send_physical_buttons;
  55. extern RD_BOOL g_fullscreen;
  56. extern RD_BOOL g_grab_keyboard;
  57. extern RD_BOOL g_hide_decorations;
  58. @@ -2190,7 +2191,8 @@
  59. receive physical buttons (true in mstsc as well) and
  60. logical button behavior depends on the remote desktop's own
  61. mouse settings */
  62. - xevent.xbutton.button = g_pointer_log_to_phys_map[xevent.xbutton.button - 1];
  63. + if (g_send_physical_buttons)
  64. + xevent.xbutton.button = g_pointer_log_to_phys_map[xevent.xbutton.button - 1];
  65. button = xkeymap_translate_button(xevent.xbutton.button);
  66. if (button == 0)
  67. return;