summaryrefslogtreecommitdiff
path: root/hw/xquartz/xpr
AgeCommit message (Collapse)AuthorFilesLines
2011-03-23XQuartz: Put ifdef guards around have_depth label (-Wunused-label)Jeremy Huddleston1-0/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27XQuartz: Don't use deprecated CoreGraphics API on SL and LionJeremy Huddleston1-1/+26
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27XQuartz: RandR: Add RandR modes for the primary display in multi-monitor configsJeremy Huddleston1-0/+7
We now support using RandR to set the resolution of the primary display (and place a shielding window on other displays) in multi-monitor configurations. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27XQuartz: RandR: Capture the display when switching modes with RandRJeremy Huddleston2-0/+6
This will prevent native windows from resizing as we change resolutions. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22XQuartz dri: Don't check CoreGraphics versionJeremy Huddleston1-112/+0
The version check is hackish, and I highly doubt anyone using this code is on a version of OS X that predates this support (10.2 has support for it). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28XQuartz: RandR: Don't change the rootless preference when changing RandR modeJeremy Huddleston4-8/+9
Also renames a bunch of other variables for better consistency. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28XQuartz: RandR: Respond better to resolution changes made outside XJeremy Huddleston1-0/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28XQuartz: RandR: Implement basic RandR functionality.Jan Hauffa1-2/+4
Querying and changing of resolution and refresh rate is supported, rotation is not implemented yet. Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28XQuartz: Move use of static dispatch procs after declarationJeremy Huddleston1-21/+20
This fixes fallout from cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-28xserver: delete pervasively use of DISPATCH_PROCTiago Vignatti1-2/+0
Some functions had to be moved around due some missing static definitions. Another minor clean up like inexistent function declarations and etc were made also. Part of this patch was cooked using: sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files` Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-13rootless: Delete dead remnants of rootless acceleration.Jamey Sharp2-10/+0
Jeremy deleted rootlessAccelInit's implementation in 2008 in commit 587c010a1cd733fded4d49dc339df0634bda8be6. Delete its prototype and the remaining commented-out call to it. It still makes sense for the rootless GC ops to relax the planemask, but that's independent of the size of the operation, so quit checking the thresholds there. FillBytes and CompositePixels are not called anywhere, so delete everything related to both. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13xquartz: Delete compile-time-constant DRIGCRec.driOps field.Jamey Sharp1-5/+1
The driOps field of this structure is never set to anything but &driGCOps, and this structure is not visible outside this source file. Just use the constant in the one place the field was used. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12XQuartz: xpr: Bail on errors during unlock and destroyJeremy Huddleston1-2/+8
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-12XQuartz: Make application switching work better for the no-spaces caseJeremy Huddleston1-1/+1
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-07-13XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some ↵Jeremy Huddleston1-1/+5
configs Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-06-10Merge remote branch 'jeremyhu/master'Keith Packard3-18/+12
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov1-1/+1
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-08XQuartz: Fix build regression from faeebead7bfcc78535757ca7acc1faf7554c03b7Jeremy Huddleston3-18/+12
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard3-17/+28
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-06-05Rename region macros to eliminate screen argumentKeith Packard2-6/+6
This is a combination of a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole tree: $ git ls-files | grep -v '^fix-' | xargs ./fix-region And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. The hand-done changes involve removing functions from dix/region.c that duplicate inline functions in include/regionstr.h, along with their declarations in regionstr.h, mi.h and mispans.h. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-03Move each screen's x/y origin into ScreenRec.Jamey Sharp1-2/+2
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-03Move each screen's root-window pointer into ScreenRec.Jamey Sharp2-3/+3
Many references to the WindowTable array already had the corresponding screen pointer handy, which meant they usually looked like "WindowTable[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 uses this data, a screen private entry isn't appropriate. xf86-video-dummy currently uses WindowTable, so it needs to be updated to reflect this change. 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-05-19Set event sequence number in WriteEventsToClient instead of at callers.Jamey Sharp1-7/+1
TryClientEvents already did this; this commit just moves the assignment one level down so that no event source has to worry about sequence numbers. ...No event source, that is, except XKB, which inexplicably calls WriteToClient directly for several events. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19Make WriteEventsToClient/WriteToClient no-op on fake or dead clients.Jamey Sharp1-1/+1
This matches the test in TryClientEvents, and is a superset of tests done by the callers of these functions. The consequence of forgetting these tests is a server crash, so they're always desirable. In my opinion, it's better to not require the callers to remember to do these checks. For callers that don't do very much work before calling WriteToClient or WriteEventsToClient, I've removed the redundant checks. hw/xquartz/xpr/appledri.c has an interesting case: While its check for "client == NULL" appears redundant with the test in WriteEventsToClient, it dereferences client to get the sequence number. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497 Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-13Eliminate boilerplate around client->noClientException.Jamey Sharp1-7/+7
Just let Dispatch() check for a noClientException, rather than making every single dispatch procedure take care of it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov5-26/+26
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-02x-list.c: null-returning function malloc() was called without checkingOliver McFadden1-0/+1
Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-15XQuartz: remove undefined XSERVER_CFLAGS variableGaetan Nadon1-1/+1
This is a variable local to configure.ac which is not AC_SUBST() It is undefined in any generated Makefile. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-30XQuartz: Attatch a stub display when CoreGraphics reports no displays.Jeremy Huddleston1-0/+13
This is half of the required changes to address the "stuck mouse pointer" bug that occurs when X11 launches while the displays are asleep. The remainder of the fix is part of libXplugin which needs to be updated to send XP_EVENT_DISPLAY_CHANGED when the display wakes up. If you don't have a recent enough libXplugin (expected in 2.5.0_beta2 or later), you can cause this event to be sent by changing your display resolution (or you could just start X11.app with your screens awake). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-01-13XQuartz: Don't FatalError in x_hook_run if the list is emptyJeremy Huddleston1-0/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-18Add type name argument to CreateNewResourceTypeAlan Coopersmith1-5/+2
Convert all calls of CreateNewResourceType to pass name argument Breaks DIX ABI. ABI versions bumped: Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18Ensure all resource types created have names registeredAlan Coopersmith1-0/+4
Calls RegisterResourceName to record the type name for use by X-Resource, XACE/SELinux/XTsol, and DTrace. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18Check for failures from CreateNewResourceTypeAlan Coopersmith1-1/+1
Make sure to check return value before setting bitmask flags. For most calls, just fails to init the extension. Since Xinput already calls FatalError() on initialization failure, so does failure to allocate Xinput's resource type. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-11-30XQuartz: Drop calls to allocaJeremy Huddleston2-5/+20
This makes us more consistent with the rest of the codebase, using xalloc/xfree Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-13Rootless: Abstract some of the Xplugin specific stuff which has crept into ↵Jeremy Huddleston1-1/+46
rootlessWindow.c The rootless extension now directly calls some Xplugin functions, and relies on types defined in Xplugin.h, which isn't very abstracted :-) This patch is a start at abstracting some of the Xplugin specific stuff which has crept into rootlessWindow.c. This has been done in a pretty mindless fashion, without much thought as to if the additions to the generic rootless interface are the correct ones There is some confusion as to if RootlesscolormapCallback() returns a Bool or xp_error_enum value (not so abstact), but I have no way of checking, of finding out if Xplugin actually checks the result :-) Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-27XQuartz: Fix QuartzSetCursor to match the expected prototype.Jeremy Huddleston1-2/+2
(cherry picked from commit dadab5a2279a19dcf709402d7f22f0cd48670db0)
2009-09-27XQuartz: Fix a bunch of compilation warnings about styleJeremy Huddleston4-8/+8
(cherry picked from commit 54000bdcbca52a2de31f7c1a1147de6d8e9dbbb8)
2009-09-27XQuartz: Transition from xEvent based mieq to InternalEventJeremy Huddleston4-34/+25
(cherry picked from commit a3dbde2de87ee4f577748a8c447501a3ea462559)
2009-09-21input: define server-supported protocol versions in one single file.Peter Hutterer1-3/+4
include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Rémi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org>
2009-08-25XQuartz: Use applewmproto 1.4 updated headers.Jeremy Huddleston2-4/+2
(cherry picked from commit 203df06c0eb2dcd5adfa788a1ba9569650c15f9c)
2009-07-31XQuartz: Unify how we set our bitmasks for visualsJeremy Huddleston1-19/+6
(cherry picked from commit c230b52c27ce50ac6c27011ec8e88f1b263b25f9)
2009-07-31XQuartz: no DirectColorJeremy Huddleston1-2/+2
(cherry picked from commit df2fbc410f2c484612f65a6539a6cb069ef4a468)
2009-07-25XQuartz: xpr: Added missing include for RootlessHideAllWindowsJeremy Huddleston1-0/+2
(cherry picked from commit 75e104730810acbb11bf8503bac24ea25243b2ac)
2009-07-14xquartz: switch to byte counting functionsPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2009-07-03XQuartz: ProcAppleWMAttachTransient to play nice with the new Dock in SLJeremy Huddleston1-2/+35
(cherry picked from commit ddc0242d8f291d0f961ba9aa8c883e39861ce2ad)
2009-04-10XQuartz: xprSetWindowLevel updated to store the level requested by the WMJeremy Huddleston1-1/+15
(cherry picked from commit c28c2ddc3a8f3c5b9beec396953bb3ac9ee4714b)
2009-04-10XQuartz: Update window levels when changing rootless stateJeremy Huddleston1-12/+22
(cherry picked from commit 1359ded5bfc14a80fb998b01a54ecacb96c4ff88)
2009-04-10XQuartz: Fix window levels for rooted mode to allow showing the menu bar.Jeremy Huddleston1-3/+5
(cherry picked from commit 80759a4186bf0335edc85aecea2faf11fe09f491)
2009-04-10XQuartz: Properly set the window level for the root windowJeremy Huddleston3-12/+21
(cherry picked from commit bdf9286d1cbfeaaf8eaf03d28091e91ee587ee25)
2009-04-10XQuartz: In rooted mode, make sure we start in the hidden state.Jeremy Huddleston1-0/+3
(cherry picked from commit 5ecc497f71c2133f773f6c56ad76cb778862ddd6)