diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2015-07-19 11:52:17 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2015-07-19 11:52:17 -0700 |
commit | dbf959f5faed39792ad8241d169a50baf79215f5 (patch) | |
tree | 986a3afe2e17db45d38cc3b166803e1d098d4272 /xorg | |
parent | a330789e5bf588bdbc52a5251934a07a0f9abdfa (diff) | |
download | xrdp-proprietary-dbf959f5faed39792ad8241d169a50baf79215f5.tar.gz xrdp-proprietary-dbf959f5faed39792ad8241d169a50baf79215f5.zip |
X11rdp: do not Enqueue motion unless mouse position actually changes, fixes some context menus not always working
Diffstat (limited to 'xorg')
-rw-r--r-- | xorg/X11R7.6/rdp/rdpinput.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/xorg/X11R7.6/rdp/rdpinput.c b/xorg/X11R7.6/rdp/rdpinput.c index a13c7b5b..90788449 100644 --- a/xorg/X11R7.6/rdp/rdpinput.c +++ b/xorg/X11R7.6/rdp/rdpinput.c @@ -59,6 +59,8 @@ extern int g_alt_down; /* in rdpmain.c */ extern int g_ctrl_down; /* in rdpmain.c */ static int g_old_button_mask = 0; +static int g_old_x = 0; +static int g_old_y = 0; /* this is toggled every time num lock key is released, not like the above *_down vars */ static int g_scroll_lock_down = 0; @@ -858,7 +860,12 @@ rdpDeferredInputCallback(OsTimerPtr timer, CARD32 now, pointer arg) { LLOGLN(10, ("rdpDeferredInputCallback:")); g_timer_schedualed = 0; - rdpEnqueueMotion(g_x, g_y); + if ((g_old_x != g_x) || (g_old_y != g_y)) + { + rdpEnqueueMotion(g_x, g_y); + g_old_x = g_x; + g_old_y = g_x; + } return 0; } @@ -886,7 +893,12 @@ PtrAddEvent(int buttonMask, int x, int y) g_timer_schedualed = 0; TimerCancel(g_timer); } - rdpEnqueueMotion(x, y); + if ((g_old_x != x) || (g_old_y != y)) + { + rdpEnqueueMotion(x, y); + g_old_x = x; + g_old_y = y; + } for (i = 0; i < 5; i++) { if ((buttonMask ^ g_old_button_mask) & (1 << i)) |