diff options
author | marha <marha@users.sourceforge.net> | 2012-02-01 08:36:02 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-02-01 08:36:02 +0100 |
commit | 68320ff05946f092b6836754c6267b1dff2f4633 (patch) | |
tree | 424d73f509dff521d4cc22a95369594b7ee56dad /xorg-server/hw/xquartz/darwinEvents.c | |
parent | 71b5bea4d5ef75f50bd7bd7b93f47f8552c178e0 (diff) | |
parent | 58ff764d4111bfaa7360c57bc62dd620fbdce06f (diff) | |
download | vcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.tar.gz vcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.tar.bz2 vcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'xorg-server/hw/xquartz/darwinEvents.c')
-rw-r--r-- | xorg-server/hw/xquartz/darwinEvents.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/xorg-server/hw/xquartz/darwinEvents.c b/xorg-server/hw/xquartz/darwinEvents.c index c367e3c1c..3438da116 100644 --- a/xorg-server/hw/xquartz/darwinEvents.c +++ b/xorg-server/hw/xquartz/darwinEvents.c @@ -434,6 +434,28 @@ static void DarwinPrepareValuators(DeviceIntPtr pDev, int *valuators, ScreenPtr // valuators[0], valuators[1], valuators[2], valuators[3], valuators[4]); } +void DarwinInputReleaseButtonsAndKeys(DeviceIntPtr pDev) { + darwinEvents_lock(); { + int i; + if (pDev->button) { + for (i = 0; i < pDev->button->numButtons; i++) { + if (BitIsOn(pDev->button->down, i)) { + QueuePointerEvents(pDev, ButtonRelease, i, POINTER_ABSOLUTE, NULL); + } + } + } + + if (pDev->key) { + for (i = 0; i < NUM_KEYCODES; i++) { + if (BitIsOn(pDev->key->down, i + MIN_KEYCODE)) { + QueueKeyboardEvents(pDev, KeyRelease, i + MIN_KEYCODE, NULL); + } + } + } + DarwinPokeEQ(); + } darwinEvents_unlock(); +} + void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, float pointer_x, float pointer_y, float pressure, float tilt_x, float tilt_y) { static int darwinFakeMouseButtonDown = 0; |