archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / rdesktop / trunk / rdesktop-send_physical_buttons.diff
blob69620988f01b6f7cb2032ff8b79ed46c711a161e
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
28 while ((c = getopt(argc, argv,
29 - VNCOPT "A:u:L:d:s:c:p:n:k:g:o:fbBeEitmzCDKS:T:NX:a:x:Pr:045h?")) != -1)
30 + VNCOPT "A:u:L:d:s:c:p:n:k:g:o:fbBeEitMmzCDKS:T:NX:a:x:Pr:045h?")) != -1)
32 switch (c)
34 @@ -584,6 +586,9 @@
35 case 'E':
36 g_packet_encryption = False;
37 break;
38 + case 'M':
39 + g_send_physical_buttons = False;
40 + break;
41 case 'm':
42 g_sendmotion = False;
43 break;
44 Index: xwin.c
45 ===================================================================
46 RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
47 retrieving revision 1.235
48 diff -u -r1.235 xwin.c
49 --- xwin.c 11 Jul 2008 03:51:23 -0000 1.235
50 +++ xwin.c 5 Aug 2008 11:46:06 -0000
51 @@ -36,6 +36,7 @@
52 extern int g_ypos;
53 extern int g_pos;
54 extern RD_BOOL g_sendmotion;
55 +extern RD_BOOL g_send_physical_buttons;
56 extern RD_BOOL g_fullscreen;
57 extern RD_BOOL g_grab_keyboard;
58 extern RD_BOOL g_hide_decorations;
59 @@ -2190,7 +2191,8 @@
60 receive physical buttons (true in mstsc as well) and
61 logical button behavior depends on the remote desktop's own
62 mouse settings */
63 - xevent.xbutton.button = g_pointer_log_to_phys_map[xevent.xbutton.button - 1];
64 + if (g_send_physical_buttons)
65 + xevent.xbutton.button = g_pointer_log_to_phys_map[xevent.xbutton.button - 1];
66 button = xkeymap_translate_button(xevent.xbutton.button);
67 if (button == 0)
68 return;