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 54000bdcbca52a2de31f7c1a1147de6d8e9dbbb8)
2009-09-27 23:31:35 -07:00
Jeremy Huddleston 226b1033b4 XQuartz: Transition from xEvent based mieq to InternalEvent
(cherry picked from commit a3dbde2de87ee4f577748a8c447501a3ea462559)
2009-09-27 23:31:07 -07:00
Jeremy Huddleston 07c935b72f XQuartz: Use applewmproto 1.4 updated headers.
(cherry picked from commit 203df06c0eb2dcd5adfa788a1ba9569650c15f9c)
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 bfe0b9cfa7af4a48dba849cab1eb152c409b4e08)
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 6fa62192af937aa9656f64b516050bc099231c7a)
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 c21ca7558d2faf93c61f5feaafd7c878e9e21942)
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 70a18558c6b0a02b633fd8974f002cdf3cdc713e)
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 b5ec3be6b5449b5d575bc1472fdd1c9cb15cb8be)
2009-04-11 17:22:20 -07:00
Jeremy Huddleston d6976e1436 XQuartz: Re-enable support for capslock
(cherry picked from commit 4901b8147e593d26d7a31a9b73a201254b948916)
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 6461729647ff4441d80811e73f0c0d2f108f2700)
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 7a8d2266861e74176b5310b83652a9c10a170494)
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 cb912aca3a2834c4ad8e386c8a0d05c1bb31b0e7)
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 a41e7f75decd340d064fdc0d2c4fe6c88d7dbc82)
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 9ca099e928653b5a0fb745186e17bfcc3d74ccc0)
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 1115917ada127a1cd6a8b61efe7fd134e2ea85fd)
2008-10-31 15:49:44 -07:00
Jeremy Huddleston 93d7cd31c5 XQuartz: Purge the old XQUARTZ_EXPORTS_LAUNCHD_FD option
(cherry picked from commit 490756c7fbe0792c4bd6ae434e7a48e0beffa5c7)
2008-10-31 15:48:15 -07:00
Jeremy Huddleston d13c3cbd43 XQuartz: Some motion made towards supporting fullscreen.
(cherry picked from commit 99be3d68b64059caada739a373e5e01844c776e0)
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 d79ccb45f68b65d65718b5b77efe2fae6eeda762)
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 f41583761955cb9c92c43239bfaa8ae0e5d95e33)
2008-10-03 11:13:03 -07:00
Jeremy Huddleston 5446adebfb XQuartz: Send AppleWMReloadPreferences where appropriate.
(cherry picked from commit 490cbe9888e2c1080495b003c429fdb1659444e1)
2008-10-03 11:12:49 -07:00
Jeremy Huddleston 12a59c44cb XQuartz: Fixed threading issue with TSM.
(cherry picked from commit 93ab4e0071670bb80bfa1170dd97ed9d6d51c67a)
2008-09-26 12:31:21 -07:00
Jeremy Huddleston 999f3362d5 XQuartz: Dead code removal
(cherry picked from commit 43184cd379c4fb7254391b8a362016cbf89b5529)
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 6bca78760951cb5cb57ea66b7631a2dc230dc27a)
(cherry picked from commit fafcafd6de39cf6b5967793f03b30b49db36fec5)
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 ebfe49dfca6e04d66232bad760f522629397cc35)
(cherry picked from commit 2cf74a76d54d795cfc3c0380a526b9177327782d)
2008-09-03 09:24:59 -07:00
Jeremy Huddleston dc1171df5b XQuartz: Fixed bogus args to debug ErrorF
(cherry picked from commit f0351c2b80f30ae31f041798b84139141fc3d5a5)
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 8fb6a1cf44c35a20dfb0c05c9824f94898f88da7)
(cherry picked from commit ae9c1b3cfb3874b4d1251681c24bda91c398bcab)
2008-08-20 10:00:20 -07:00
Jeremy Huddleston 8b9ed7dec2 XQuartz: Fixed a stuck modifier key bug.
(cherry picked from commit eeb6e5a9e98dcf045ec230f160d5992080dceba6)
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 d207b037d2ae213369e5627a17d8831c9bc16ad8)
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 a8f0d32216e321b8ae6da182be9b1ea792f6e004)
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 08f3fe153edc5ab4ca010e8ce82d5c3fc0ddb72c)
2008-08-05 12:54:51 -07:00
Jeremy Huddleston 90dd2de845 XQuartz: Some fd handoff cleanup.
(cherry picked from commit 9c20a4804d97e67a988f00f49866997209cce518)
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 ee92aced10d0743c4658e53b58b5d9f5a094a415)
2008-06-10 01:46:01 -07:00
Jeremy Huddleston 40855d8000 XQuartz: Removed async debugging sleep
(cherry picked from commit 7812a8bdf9fab651ea5c07b852b2999547ec628d)
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 ff1c443cadf11d12a7d939e51194f6105153870e)
2008-06-04 12:24:12 -07:00
Jeremy Huddleston e997df8cd3 XQuartz: Cleaned up ListenOnOpenFD...
(cherry picked from commit 6fb587d3d5fbbaee9e46cdce24d03e5d1c66d58a)
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 27fbfeacfa16d620801ac3492b25c1e50aec8588)
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 543c2cd68d1ffef65d4644b860faad7191c6b9da)
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 5626b0949b1a6bdd2fa3ec2ef53a688084349b87)
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 8d9eab3a2ec5955cc2698fdcb1fa6ed12b2aadb7)
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 ff10c37bdd09656cf2f7ee9577f5552caa1ffdb8)
2008-05-02 17:42:36 -07:00