diff options
author | marha <marha@users.sourceforge.net> | 2012-02-01 08:27:16 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-02-01 08:27:16 +0100 |
commit | 58ff764d4111bfaa7360c57bc62dd620fbdce06f (patch) | |
tree | adc5c52beb88c10ecb1df7b33983e901afc7dea0 /xorg-server/hw/xquartz/darwinEvents.c | |
parent | c7a181e449c6a2ea5f0ad0514865e7c559dbe6dc (diff) | |
download | vcxsrv-58ff764d4111bfaa7360c57bc62dd620fbdce06f.tar.gz vcxsrv-58ff764d4111bfaa7360c57bc62dd620fbdce06f.tar.bz2 vcxsrv-58ff764d4111bfaa7360c57bc62dd620fbdce06f.zip |
xserver mesa pixman xkbcomp xkeyboard-config git update 1 feb 2012
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; |