Commit Graph

84 Commits

Author SHA1 Message Date
Jeremy Huddleston
965e709f2b XQuartz: Build-fixes for XQuartz for recent input API changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-12 11:49:49 +10:00
Peter Hutterer
675f4a8525 Abstract valuator masks through a set of APIs.
This commit introduces an abstraction API for handling masked valuators. The
intent is that drivers just allocate a mask, set the data and pass the mask
to the server. The actual storage type of the mask is hidden from the
drivers.

The new calls for drivers are:
    valuator_mask_new()     /* to allocate a valuator mask */
    valuator_mask_zero()    /* to reset a mask to zero */
    valuator_mask_set()     /* to set a valuator value */

The new interface to the server is
    xf86PostMotionEventM()
    xf86PostButtonEventM()
    xf86PostKeyboardEventM()
    xf86PostProximityEventM()

all taking a mask instead of the valuator array.

The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to
memory allocation restrictions in SIGIO handlers.

For easier review, a lot of the code still uses separate valuator arrays.
This will be fixed in a later patch.

This patch was initially written by Chase Douglas.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 11:02:48 +10:00
Jeremy Huddleston
c45bea0c04 XQuartz: RandR: Refactor legacy mode-switching to be better integrated with RandR
Adds three new functions
void QuartzRandRSetFakeRootless (void);
void QuartzRandRSetFakeFullscreen (void);
void QuartzRandRToggleFullscreen (void);

The first two are identical to requesting the fake modes from a RandR client
The third responds to cmd-alt-a to leave fullscreen or RandR.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 10:09:11 -07:00
Jeremy Huddleston
229323a19b XQuartz: RandR: Don't change the rootless preference when changing RandR mode
Also renames a bunch of other variables for better consistency.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:35 -07:00
Jeremy Huddleston
026a47e212 XQuartz: RandR: Respond better to resolution changes made outside X
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28 09:50:34 -07:00
Jeremy Huddleston
e5bc62a032 XQuartz: Ignore kXquartzToggleFullscreen when rootless
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Jamey Sharp
a83cff9f4d Move each screen's x/y origin into ScreenRec.
Many references to the dixScreenOrigins array already had the
corresponding screen pointer handy, which meant they usually looked like
"dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead
of keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.

Since dix declared the dixScreenOrigins array, I figure allocating a
screen private for these values is overkill.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03 14:03:23 -07:00
Jeremy Huddleston
67a51cd9ef XQuartz: Fix a bunch of compilation warnings about style
(cherry picked from commit 54000bdcbc)
2009-09-27 23:31:35 -07:00
Jeremy Huddleston
226b1033b4 XQuartz: Transition from xEvent based mieq to InternalEvent
(cherry picked from commit a3dbde2de8)
2009-09-27 23:31:07 -07:00
Jeremy Huddleston
07c935b72f XQuartz: Use applewmproto 1.4 updated headers.
(cherry picked from commit 203df06c0e)
2009-08-25 20:16:47 -07:00
Jeremy Huddleston
48703083a1 XQuartz: Use pDev=NULL for DarwinSendDDXEvent
These events aren't really related to physical input devices anyways, so it doesn't make sense to use the pointer.
(cherry picked from commit bfe0b9cfa7)
2009-07-25 20:18:15 -07:00
Jeremy Huddleston
09b024db63 XQuartz: Use the master device in DarwinSendDDXEvent to avoid duplicate events.
(cherry picked from commit 6fa62192af)
2009-07-25 15:25:17 -07:00
Jeremy Huddleston
80a7bb2605 XQuartz: Solve the tablet 100% CPU bug
This happened because we put a byte in the fd to wake up dispatch, but we never actually enqueued anything in mieq because the num_events was 0.
(cherry picked from commit c21ca7558d)
2009-04-11 17:26:07 -07:00
Jeremy Huddleston
5e55becddc XQuartz: Make sure the Fn doesn't trigger unneccessary calls to DarwinUpdateModKeys()
(cherry picked from commit 70a18558c6)
2009-04-11 17:22:38 -07:00
Jeremy Huddleston
bd1d917909 XQuartz: Re-enable Fn as an option for 3button mouse simulation.
Patch from Martin Otte <otte@duke.edu>
(cherry picked from commit b5ec3be6b5)
2009-04-11 17:22:20 -07:00
Jeremy Huddleston
d6976e1436 XQuartz: Re-enable support for capslock
(cherry picked from commit 4901b8147e)
2009-02-24 23:14:01 -08:00
Jeremy Huddleston
0720816aea XQuartz: Only call DarwinUpdateModKeys when needed
Previously, we were calling it on almost every itteration through sendX11Event
(cherry picked from commit 6461729647)
2009-01-11 16:37:46 -08:00
Jeremy Huddleston
5339c22a8c XQuartz: Add locking to make mieq thread safe on OSX
(cherry picked from commit 7a8d226686)
2009-01-11 01:56:45 -08:00
Jeremy Huddleston
2f361186f9 XQuartz: Don't use NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK
We don't have keycodes for them, so don't try to use them
(cherry picked from commit cb912aca3a)
2008-12-31 12:45:34 -08:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10:00
Jeremy Huddleston
ccd2c668c1 XQuartz: darwinPointer reports the actual pixel position now rather than a relative position
(cherry picked from commit a41e7f75de)
2008-12-06 14:12:27 -08:00
Jeremy Huddleston
8e2287c220 XQuartz: Updated some code to use newer server API 2008-11-22 13:57:45 -08:00
Jeremy Huddleston
9f49f5172d XQuartz: Silence pointer debug spam
(cherry picked from commit 9ca099e928)
2008-10-31 15:49:52 -07:00
Jeremy Huddleston
93298c7f8f XQuartz: Don't map the menu bar to the screen area.
(cherry picked from commit 1115917ada)
2008-10-31 15:49:44 -07:00
Jeremy Huddleston
93d7cd31c5 XQuartz: Purge the old XQUARTZ_EXPORTS_LAUNCHD_FD option
(cherry picked from commit 490756c7fb)
2008-10-31 15:48:15 -07:00
Jeremy Huddleston
d13c3cbd43 XQuartz: Some motion made towards supporting fullscreen.
(cherry picked from commit 99be3d68b6)
2008-10-08 18:45:17 -07:00
Jeremy Huddleston
1657dfb843 XQuartz: Using absolute ranges for pointer location to increase resolution and better support tablets.
(cherry picked from commit d79ccb45f6)
2008-10-03 11:14:38 -07:00
Jeremy Huddleston
aae878b890 XQuartz: Actually send the pointer event from the pen even if it happes to actually have 0 pressure and 0 tilt.
(cherry picked from commit f415837619)
2008-10-03 11:13:03 -07:00
Jeremy Huddleston
5446adebfb XQuartz: Send AppleWMReloadPreferences where appropriate.
(cherry picked from commit 490cbe9888)
2008-10-03 11:12:49 -07:00
Jeremy Huddleston
12a59c44cb XQuartz: Fixed threading issue with TSM.
(cherry picked from commit 93ab4e0071)
2008-09-26 12:31:21 -07:00
Jeremy Huddleston
999f3362d5 XQuartz: Dead code removal
(cherry picked from commit 43184cd379)
2008-09-12 15:26:18 -07:00
Jeremy Huddleston
46168b3b40 XQuartz: Updated Tablet code to include ranges for valuators and added cursor and erasor
(cherry picked from commit 6bca787609)
(cherry picked from commit fafcafd6de)
2008-09-03 09:33:53 -07:00
Jeremy Huddleston
b3836e5bdd XQuartz: Cleaned up our sleeping before adding the launchd socket.
(cherry picked from commit ebfe49dfca)
(cherry picked from commit 2cf74a76d5)
2008-09-03 09:24:59 -07:00
Jeremy Huddleston
dc1171df5b XQuartz: Fixed bogus args to debug ErrorF
(cherry picked from commit f0351c2b80)
2008-08-26 20:19:41 -07:00
Jeremy Huddleston
be06961312 XQuartz: More input fixes
stuck-modifier fixes (capslock)
3button-emulation now doesn't send the modifier key with the click
Added other options to fake_button2 and fake_button3 defaults options:
	({l,r}{control,alt,command,shift})
(cherry picked from commit 8fb6a1cf44)
(cherry picked from commit ae9c1b3cfb)
2008-08-20 10:00:20 -07:00
Jeremy Huddleston
8b9ed7dec2 XQuartz: Fixed a stuck modifier key bug.
(cherry picked from commit eeb6e5a9e9)
2008-08-14 09:13:37 -07:00
Jeremy Huddleston
1770c85374 XQuartz: Made 3-button mouse simulation a little more consistent.
(cherry picked from commit d207b037d2)
2008-08-14 09:13:35 -07:00
Jeremy Huddleston
e72b1d21e4 XQuartz: Now properly disable xauth checking on launchd socket and mostly fix the xinitrc / launchd race condition 2008-08-06 13:37:21 -07:00
Jeremy Huddleston
26d31ad1c7 XQuartz: Added code and made comments more helpful for debugging first-client-auth bug.
(cherry picked from commit a8f0d32216)
2008-08-05 18:47:35 -07:00
Jeremy Huddleston
30851efdd4 XQuartz: Fixed first-client-can't-connect bug
Readded the old exec() server startup path for regression testing.
Don't use the dynamic fd addition code since it's not quite working correctly.
(cherry picked from commit 08f3fe153e)
2008-08-05 12:54:51 -07:00
Jeremy Huddleston
90dd2de845 XQuartz: Some fd handoff cleanup.
(cherry picked from commit 9c20a4804d)
2008-07-11 10:13:32 -07:00
Jeremy Huddleston
5170c169db XQuartz: Fixed the "laggy" startup under the new model. This was caused by xinit blocking expecting SIGUSR1 and our stub never sending it.
(cherry picked from commit ee92aced10)
2008-06-10 01:46:01 -07:00
Jeremy Huddleston
40855d8000 XQuartz: Removed async debugging sleep
(cherry picked from commit 7812a8bdf9)
2008-06-04 12:24:15 -07:00
Jeremy Huddleston
ee86b75119 XQuartz: use a condition variable to signal when darwinEvents is ready rather than polling
(cherry picked from commit ff1c443cad)
2008-06-04 12:24:12 -07:00
Jeremy Huddleston
e997df8cd3 XQuartz: Cleaned up ListenOnOpenFD...
(cherry picked from commit 6fb587d3d5)
2008-05-18 23:32:57 -07:00
Jeremy Huddleston
4be2104c80 XQuartz: More work towards Mach-IPC startup... started working on FD passing
(cherry picked from commit 27fbfeacfa)
2008-05-18 22:45:19 -07:00
Jeremy Huddleston
2408303d79 XQuartz: Added functionality to add a file descriptor to the connection list after the server is already running.
(cherry picked from commit 543c2cd68d)
2008-05-17 14:56:53 -07:00
Jeremy Huddleston
1d09deaa6e XQuartz: Made DarwinSendDDXEvent a little more robust to context switching diring server init.
(cherry picked from commit 5626b0949b)
2008-05-17 14:56:30 -07:00
Jeremy Huddleston
f4a68f3701 XQuartz: Fix mouse input offsets earlier since GetPointerEvents does not like negative (x,y) values
(cherry picked from commit 8d9eab3a2e)
2008-05-02 17:42:41 -07:00
Jeremy Huddleston
96fa7da3b8 XQuartz: Avoid a possible crash at startup due to unfavorable context switching.
(cherry picked from commit ff10c37bdd)
2008-05-02 17:42:36 -07:00