Commit Graph

177 Commits

Author SHA1 Message Date
Nicolas Kaiser
c270cfc30c hw/xquartz: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-24 19:46:07 -07:00
Jeremy Huddleston
5f496bc919 XQuartz: Do translation and handoff of NSEvent to X11 in a separate serial queue
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-22 02:20:59 -07:00
Jeremy Huddleston
72bd232b11 XQuartz: Send tablet proximity events with tilt and pressure
<rdar://problem/6257569>

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-22 01:24:44 -07:00
Jeremy Huddleston
3960115dbc XQuartz: Fix prototypes for thread functions
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-21 23:56:18 -07:00
Jeremy Huddleston
968652983f XQuartz: RandR: Provide an alert box when entering a RandR mode for the first time.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27 15:46:22 -08:00
Jeremy Huddleston
883039e07b XQuartz: Just NSBeep() for XBell()
The CoreAudio path uses deprecated API and has reported crashes that
aren't worth fixing (4e8bf12b13 fixed
one and introduced another).  NSBeep() does the job just fine.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-08 13:57:19 -08:00
Jeremy Huddleston
a4698754c1 XQuartz: Add pointer debugging
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 19:14:51 -08: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
4fc4cab98d XQuartz: Make application switching work better for the no-spaces case
We still have the issue with not raising the frontmost window for the case
when spaces is enabled, and the AppleSpacesSwitchOnActivate preference is
disabled.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12 20:26:36 -10:00
Jeremy Huddleston
ecfeabec8d XQuartz: Don't use deltaXY for determining pointer location on scroll events
<rdar://problem/7989690>

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Edward Moy <emoy@apple.com>
2010-05-16 13:12:26 -07:00
Jeremy Huddleston
a911292c85 XQuartz: Don't trust deltaXY for middle mouse clicks.
The middle mouse clicks return erroneous values after returning from
Fast User Switching.

<rdar://problem/7979468>
http://xquartz.macosforge.org/trac/ticket/389

Signed-off-by: Martin Otte <otte@duke.edu>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Edward Moy <emoy@apple.com>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-16 13:12:15 -07:00
Jeremy Huddleston
840d12c7a6 XQuartz: Add a defaults option to toggle Alt / Mode_switch
See option_sends_alt in Xquartz(1)

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Kevin Van Vechten <kvv@apple.com>
2010-04-11 16:30:19 -07:00
Jeremy Huddleston
d16bc8a3cd XQuartz: xpbproxy: Cleanup xpbproxy threading
Confine xpbproxy to a single thread
Runs inside its own CFRunLoop

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-03-21 21:56:39 -07:00
Jeremy Huddleston
4127e8e5be XQuartz: clang static analysis fixes
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-15 15:03:49 -08:00
Jeremy Huddleston
6d6e8fb27f XQuartz: Controller thread launches clients
This avoids a memory leak due to no active auto-release pool on the server thread.

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-05 18:34:50 -08:00
Jeremy Huddleston
5e79976c13 XQuartz: Run xmodmap after programatically updating the keymap.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
Signed-off-by: Martin Otte <otte@duke.edu>
2009-11-03 16:35:27 -08:00
Jeremy Huddleston
c4886fbabc XQuartz: Send mouse location with scroll events.
This fixes the problem where (0, 0) was sent as the mouse location with scroll
button events causing the event to not reach the client.
2009-10-02 18:58:35 -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
96780eaf32 XQuartz: Nuke TSM
It's deprecated in SnowLeopard.  Ben and I both have no idea what it is for.  It says something about unicode input, but urxvt seems fine taking in unicode, so /shrug... bye.
(cherry picked from commit 29cb904e4d)
2009-09-27 23:31:29 -07:00
Jeremy Huddleston
558d803b29 XQuartz: Force a keymap resync on the first keypress to workaround XKB mucking with our keymap.
We need to find a better way to work with XKB on this.
(cherry picked from commit ceaa5c779c)
2009-09-27 23:31:16 -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
0fe639a314 XQuartz: Only save lastpt on mouse/tablet events
(cherry picked from commit 552be074e5)
2009-08-05 16:17:33 -07:00
Jeremy Huddleston
491c2d74c1 XQuartz: Use mouseLocation rather than locationInWindow when setting lastpt
I don't understand the *why* ... I just see that it works better this way for games like Quake2 through wine.  It *should* be better the other way, but somehow it's not.

I guess this will go in my list of puzzles to unravel.
(cherry picked from commit 65ae2d00e1)
2009-08-05 16:17:22 -07:00
Jeremy Huddleston
df6c013524 XQuartz: Don't use location delta for tablets since NSEvent does not give a precise delta.
(cherry picked from commit 6c5bf756a7)
2009-08-05 16:17:09 -07:00
Jeremy Huddleston
1e49c8d340 XQuartz: Avoid namespace collission for BOOL in Sparkle
(cherry picked from commit 227c6e01a6)
2009-07-28 22:54:06 -07:00
Jeremy Huddleston
171409cecb XQuartz: Set can_quit to true during a Sparkle-initiated relaunch.
(cherry picked from commit b2e9a77111)
2009-07-24 09:41:46 -07:00
Jeremy Huddleston
7ff84d350b XQuartz: Added a "Check for X11 Updates..." menu item.
(cherry picked from commit 305144bfa4)
2009-07-24 09:41:32 -07:00
Jeremy Huddleston
be4dd35ffe XQuartz: Initial support for automatic updates through Sparkle
(cherry picked from commit c45f1be364)
2009-07-20 22:04:18 -07:00
Jeremy Huddleston
a362d0f4fb XQuartz: Make sure the bgMouseLocationUpdated state is consistent
(cherry picked from commit 8fa8a8e1db)
2009-04-22 19:30:18 -07:00
Jeremy Huddleston
140463a197 XQuartz: Use correct values for ProximityIn and ProximityOut
This was the other underlying cause of teh 100% CPU tablet issue.
(cherry picked from commit a9cecf34c2)
2009-04-11 17:26:27 -07:00
Jeremy Huddleston
6f8f7c78f1 XQuartz: Re-enable background window checking
since that code was not the culprit for the wacom tablet, background 100% CPU bug
(cherry picked from commit fc1dc5d71b)
2009-04-11 17:23:03 -07:00
Jeremy Huddleston
8522a759c9 XQuartz: Only set MotionNotify on activation if it is updated.
(cherry picked from commit ae8077a251)
2009-04-11 17:22:50 -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
e86f4e9302 XQuartz: Send MotionNotify before button presses when X11 is in the background
(cherry picked from commit c80d0ec18e)
2009-04-10 00:46:35 -07:00
Jeremy Huddleston
67621f3b39 XQuartz: Send a MotionNotify event for the mouse cursor when activating X11.app
Otherwise if X11.app was activated with a mouse click, the location of the even is the last location of the cursor before X11 was deactivated
(cherry picked from commit c7457d7b31)
2009-04-05 16:32:02 -07:00
Jeremy Huddleston
9180081ec3 XQuartz: Still send mouse events while X11 is in the background if we have test extensions enabled
(cherry picked from commit f393fb686c)
2009-04-01 13:53:15 -07:00
Jeremy Huddleston
3311ef6ec9 XQuartz: Don't report mouse events while X11 is not the foreground application
(cherry picked from commit 5d1dd35096)
2009-03-31 18:13:18 -07:00
Jeremy Huddleston
0b6e14d46f XQuartz: Fix mouse tracking for quake, et. al. in wine
Patch courtesy of Codeweavers

Fix mouse movement tracking.  For a non-window-related mouse-move event,
calculate the new position by adding the event's delta-x and delta-y values
to the previous mouse position.  Do not rely on the current mouse position
because it may have been changed by a XWarpPointer call.
(cherry picked from commit 7a67935b05)
2009-03-30 20:41:38 -07:00
Jeremy Huddleston
4b63f88b0a XQuartz: Comment out the background pointer interaction that seems to be causing CPU spinning on some configurations
(cherry picked from commit 1d479fa4f3)
2009-02-24 22:22:03 -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
c8bf582db8 XQuartz: Comment explaining the 0x10 flag for [e data2]
(cherry picked from commit 3c69528064)
2009-01-11 13:56:46 -08:00
Jeremy Huddleston
fc14d52297 XQuartz: Use AvailabilityMacros.h instead of availability.h for Tiger
(cherry picked from commit 91f3c34357)
2009-01-07 01:48:23 -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
Jeremy Huddleston
a2abaa9fd3 XQuartz: Make sure to reset the saved key state when deactivating X11.app
(cherry picked from commit 3eef78eb32)
2008-12-31 12:45:13 -08:00
Jeremy Huddleston
1a69d56afd XQuartz: Better avoid stuck keys on context switches
(cherry picked from commit e9963f1a4f)
2008-12-31 12:43:17 -08:00
Jeremy Huddleston
f464b5a916 XQuartz: Workaround OSX VNC server bug for modifier key state
A better approach which ensures we have a L modifier key down if we are told neither are down and atleast one is down... =/
(cherry picked from commit bc13dda345)
2008-12-31 12:43:02 -08:00
Jeremy Huddleston
ba9dc353a6 XQuartz: Don't use keycode 0 to determine !swallow since our most common key to swallow is actual keycode 0 (a)
(cherry picked from commit 33f43a7f03)
2008-12-21 21:36:02 -08:00
Jeremy Huddleston
aee27be278 XQuartz: Tiger fix, don't call Xplugin code in the Appkit thread if Xplugin isn't threadsafe.
(cherry picked from commit 748d9e5bd7)
2008-12-15 03:22:01 -08:00
Jeremy Huddleston
ecaaf0462d XQuartz: unsetenv(DISPLAY) if we're not org.x.X11
Also some prefix related fixes.
(cherry picked from commit fd459e9658)
2008-12-10 15:07:26 -08:00
Jeremy Huddleston
3d527b91b4 XQuartz: Added option to enable/disable test extensions
defaults write org.x.X11 enable_test_extensions -boolean true
(cherry picked from commit fd4710aff3)
(cherry picked from commit 635019ad18)
2008-11-28 13:02:54 -08:00
Jeremy Huddleston
71d3df7cc3 XQuartz: Avoid some warning messages being spewed to system.log by AppKit
(cherry picked from commit 780eff230c)
2008-11-28 13:02:52 -08:00
Jeremy Huddleston
b55cad4569 XQuartz: Don't hardcode values of org.x.X11 for the preferences domain
(cherry picked from commit 3a500d9247)
2008-11-25 00:54:37 -08:00
Jeremy Huddleston
03f7a66a1a XQuartz: Don't use TIS on Tiger...
(cherry picked from commit be8ac84c15)
2008-11-15 19:52:52 -08:00
Jeremy Huddleston
e8112784e8 XQuartz: Integrated xpbproxy into the server.
Added a configure option called --enable-standalone-xpbproxy which is useful for deveoping xpbproxy.
The 'active' switch in preferences just disables the in-server xpbproxy (not this standalone).
(cherry picked from commit 4294493632)
2008-11-15 19:52:34 -08:00
Jeremy Huddleston
1d7049f8fd Xquartz: Force sending mouse clicks to AppKit if we're over the menu bar
(cherry picked from commit 7dff93ec1a)
2008-11-14 11:10:24 -08:00
Jeremy Huddleston
3c12483264 XQuartz: Made X11Application.m a little more tidy.
(cherry picked from commit 3520386261)
2008-11-14 11:10:15 -08:00
Jeremy Huddleston
f8af66ddb2 XQuartz: Add option to allow access to the menu in fullscreen mode
(cherry picked from commit 637a9f4bd1)
2008-10-31 20:05:39 -07:00
Jeremy Huddleston
c5086badf0 XQuartz: LP64 related casting fixes from Bob Murphy
(cherry picked from commit ea71710aaa)
2008-10-31 19:03:38 -07:00
Jeremy Huddleston
31907986a6 XQuartz: Fixed Xplugin thread safety issues, so rea-enable background window check
(cherry picked from commit 5fc73b1141)
2008-10-31 15:49:32 -07:00
Jeremy Huddleston
5287602a41 XQuartz: if 0 out a block to avoid thread-unsafe lockups
(cherry picked from commit 60d7359a67)
2008-10-31 15:48:24 -07:00
Jeremy Huddleston
80b6768536 XQuartz: Do check_xinitrc() later to avoid possible deadlock.
(cherry picked from commit af95174a08)
2008-10-23 19:22:36 -07:00
George Peter Staplin
6a2693b2f9 XQuartz: Remove the enable_stereo default. We now use feature detection to enable stereo visuals.
We need to revisit the GL/indirect.c changes.  I think indirect.c should
be using the same feature detection and GLX visual config code.  The
indirect changes will require testing...
(cherry picked from commit 49b7a7c6f2)
2008-10-23 19:22:16 -07:00
Jeremy Huddleston
3e999d35c2 XQuartz: Honor the Spaces preference for "When switching to an application, switch to a space with open windows for the application"
(cherry picked from commit bf561a06b2)
2008-10-23 14:17:19 -07:00
Jeremy Huddleston
c837d182c4 XQuartz: Only send mouse events while in the background if we're over a visible window.
This "breaks" xeyes but gets rid of annoying tooltips.
(cherry picked from commit 10090a132a)
2008-10-21 09:34:56 -07:00
Jeremy Huddleston
2a9613980f XQuartz: More fullscreen fixes
Start in rooted mode when enabled
  Make the hotkey cmd-alt-a behave
(cherry picked from commit 22a54e4617)
2008-10-21 09:34:49 -07:00
Jeremy Huddleston
f67cd31d2c XQuartz: More progress towards fullscreen...
(cherry picked from commit 628cae86b4)
(cherry picked from commit b47b7ab6d6)
2008-10-21 09:34:17 -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
fc35c7a2e2 XQuartz: GLX - enable_stereo defaults option should work now
(cherry picked from commit 3a6898f487)
2008-10-04 21:16:54 -07:00
Jeremy Huddleston
d3f597a986 XQuartz: Workaround for initial pressure/tilt being sent as 0 with motion during the proximity event
(cherry picked from commit 9a91d770a6)
2008-10-03 11:14:40 -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
88bb8c6f48 XQuartz: Removed resolved comment about localization.
(cherry picked from commit 8ed5faf058)
2008-10-03 11:14:34 -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
12a59c44cb XQuartz: Fixed threading issue with TSM.
(cherry picked from commit 93ab4e0071)
2008-09-26 12:31:21 -07:00
Jeremy Huddleston
dba290ec23 XQuartz: Added a preferences UI for pbproxy options.
(cherry picked from commit d76cca5e1e)
2008-09-21 17:40:35 -07:00
Jeremy Huddleston
999f3362d5 XQuartz: Dead code removal
(cherry picked from commit 43184cd379)
2008-09-12 15:26:18 -07:00
Jeremy Huddleston
6548a55ebd XQuartz: 256 color support
(cherry picked from commit 8dd6d5c825)
2008-09-12 15:26:13 -07:00
Jeremy Huddleston
1c70e53f25 XQuartz: Fixed proximity logic errors for tablets.
(cherry picked from commit d942849f24)
2008-09-12 15:22:39 -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
aee19c7b55 XQuartz: xp_is_symbolic_hotkey_event catches the input menu, but not our mainMenu, so we still need to do that the old way.
(cherry picked from commit 25eccf12c8)
2008-08-29 20:53:10 -07:00
Jeremy Huddleston
319405fa4a XQuartz: Fixed needed xplugin version. ><
(cherry picked from commit 01b3a99dff)
2008-08-26 23:10:17 -07:00
Jeremy Huddleston
3350770bd6 XQuartz: Use new Xplugin API to determine if a keypress event corresponds to an OS-X hotkey that we should dispatch to Appkit.
(cherry picked from commit e7658e745f)
2008-08-26 20:19:47 -07:00
Jeremy Huddleston
ac936525af XQuartz: Cleaned up mouse event translation a bit more.
(cherry picked from commit c286f2a718)
2008-08-26 20:19:38 -07:00
Jeremy Huddleston
1b42f55000 Xquartz: Added missing ev_type for NSTabletPoint event.
(cherry picked from commit 07548f1394)
2008-08-26 20:19:35 -07:00
Jeremy Huddleston
6c5612c2e1 XQuartz: Added window_item_modifiers defaults item (and option to localization) to change the modifier keys used for the windows menu.
(cherry picked from commit e4110861d3)
(cherry picked from commit fcfc05482a)
2008-08-20 10:00:37 -07:00
Jeremy Huddleston
bdc277c9b3 XQuartz: Just cleaned up formatting of event processing code... no "meat" changed...
(cherry picked from commit 745bc8ab38)
(cherry picked from commit a28a2be524)
2008-08-20 10:00:32 -07:00
Jeremy Huddleston
ed42108920 XQuartz: Added appkit_modifiers defaults option which users can set to 'rcommand' to get access to the input menu with right command
(cherry picked from commit 02af74d7a5)
(cherry picked from commit 2da32894df)
2008-08-20 10:00:27 -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
666781cd9b Removed rogue #include
(cherry picked from commit af238e99da)
2008-08-08 02:57:00 -07:00
Jeremy Huddleston
de4936d748 XQuartz: Fixed proper processing of tablet button presses
(cherry picked from commit ca0babafa4)
2008-08-05 12:55:02 -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
225dddbaed XQuartz: Move the launchd display grabbing into mach_startup
(cherry picked from commit c3866c98d2)
2008-05-23 02:31:41 -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
f7d6d20ad6 XQuartz: Cleaned up the about box.
(cherry picked from commit 0279a59706)
2008-05-14 01:15:56 -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
d70487a4c0 XQuartz: Fix to tablet-event handling code; we now scale
more conservatively (to match Linux's Wacom driver) and
we now receive all tablet-related events.
(cherry picked from commit 588683cecc)
2008-04-29 23:59:26 -07:00