diff options
author | Eduardo Beloni <beloni@ossystems.com.br> | 2011-06-17 00:50:59 +0400 |
---|---|---|
committer | Eduardo Beloni <beloni@ossystems.com.br> | 2011-06-17 00:55:51 +0400 |
commit | 586b55957cb6f4b9a3fec9ba3e5201105cb49042 (patch) | |
tree | 0a365ff38eb17dd827be3dcf17ad4d4d5f8f036b | |
parent | 96d413d59233521e9982232e3a9162e70deaf5ec (diff) |
X11: do not send mouse motion events option (-m)
-rw-r--r-- | X11/xf_event.c | 3 | ||||
-rw-r--r-- | X11/xfreerdp.c | 6 | ||||
-rw-r--r-- | docs/xfreerdp.1 | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/X11/xf_event.c b/X11/xf_event.c index 5991184..e81fc41 100644 --- a/X11/xf_event.c +++ b/X11/xf_event.c @@ -62,6 +62,9 @@ xf_handle_event_MotionNotify(xfInfo * xfi, XEvent * xevent) { if (xevent->xmotion.window == xfi->wnd) { + if (!xfi->settings->mouse_motion) + if ((xevent->xmotion.state & (Button1Mask | Button2Mask | Button3Mask)) == 0) + return 0; xfi->inst->rdp_send_input_mouse(xfi->inst, PTRFLAGS_MOVE, xevent->xmotion.x, xevent->xmotion.y); } diff --git a/X11/xfreerdp.c b/X11/xfreerdp.c index 315f5ef..1a11551 100644 --- a/X11/xfreerdp.c +++ b/X11/xfreerdp.c @@ -73,6 +73,7 @@ set_default_params(xfInfo * xfi) settings->desktop_save = 0; settings->performanceflags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS; + settings->mouse_motion = 1; settings->off_screen_bitmaps = 1; settings->polygon_ellipse_orders = 1; settings->triblt = 0; @@ -122,6 +123,7 @@ out_args(void) "\t-z: enable bulk compression\n" "\t--gdi: GDI rendering (sw or hw, for software or hardware)\n" "\t-x: performance flags (m, b or l for modem, broadband or lan)\n" + "\t-m: don't send mouse motion events\n" "\t-X: embed into another window with a given XID.\n" #ifndef DISABLE_TLS "\t--no-rdp: disable Standard RDP encryption\n" @@ -391,6 +393,10 @@ process_params(xfInfo * xfi, int argc, char ** argv, int * pindex) settings->performanceflags = PERF_FLAG_NONE; xfi->codec = XF_CODEC_REMOTEFX; } + else if (strcmp("-m", argv[*pindex]) == 0) + { + settings->mouse_motion = 0; + } else if (strcmp("--app", argv[*pindex]) == 0) { *pindex = *pindex + 1; diff --git a/docs/xfreerdp.1 b/docs/xfreerdp.1 index 09f630e..e4768fd 100644 --- a/docs/xfreerdp.1 +++ b/docs/xfreerdp.1 @@ -71,6 +71,9 @@ also enable the desktop wallpaper. Setting experience to m[odem] disables all (including themes). Experience can also be a hexidecimal number containing the flags. .TP +.BR "-m" +Do not send mouse motion events. +.TP .BR "-0" Attach to the admin console of the server. This is the default if no server license is available. |