summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-10-01xace: Relax permissions on XkbGetState from Read to Getattr.xaceEamon Walsh1-1/+1
This request is used to get the current keyboard group and is called from GTK. It does not return an actual keymap (aside from modifiers) so it should be safe to relax the permission on it. However it does return button state information which should be controlled through a separate pointer Read check. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-01xace: Fake return values on denials in input polling requests.Eamon Walsh5-24/+55
Instead of returning BadAccess when "read" permission is denied on a device, falsify the device state (buttons down, keys pressed). This is nicer to applications, but may still have undesired side effects. The long-term solution is to move away from these requests or use MPX to create separate devices. Requests affected: QueryPointer, QueryKeymap, XiQueryDevice. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-01xfree86: fix xorg.conf manpage formatting errorJulien Cristau1-1/+1
2009-10-01xkb: check permissions on XKM_OUTPUT_DIRNirbheek Chauhan1-3/+2
Checking just for root is insufficient since that does not guarantee write/read permissions in XKM_OUTPUT_DIR (for example with sandbox). Check if we can write a file, as well as read it later. Otherwise, invoke the fallback to /tmp Signed-off-by: Nirbheek Chauhan <nirbheek@gentoo.org> Signed-off-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-01render: Fix crash in RenderAddGlyphs (#23645)Peter Hutterer1-1/+5
This patch fixes two bugs: size is calculated as glyph height * padded_width. If the client submits garbage, this may get above INT_MAX, resulting in a negative size if size is unsigned. The sanity checks don't trigger for negative sizes and the server goes and writes into random memory locations. If the client submits glyphs with a width or height 0, the destination pixmap is NULL, causing a null-pointer dereference. Since there's nothing to composite if the width/height is 0, we might as well skip the whole thing anyway. Tested with Xvfb, Xephyr and Xorg. X.Org Bug 23645 <http://bugs.freedesktop.org/show_bug.cgi?id=23645> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-10-01render: set the glyph picture to NULL by default.Peter Hutterer1-26/+31
In a follow-up patch we may have glyphs with a NULL picture. To cope with that, always set the pictures for glyphs to NULL at creation time and cope with cleaning up such glyphs. Also, since compositing a NULL source doesn't do a lot anyway, skip trying to do so. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-10-01exa: avoid infinite loops if UTS sw fallbacks.Michel Dänzer1-5/+5
The upload in finish access can cause an infinite loop if UTS returns FALSE in here. Fixes fd.o bug #24246. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-01Re-fix DGA removal.Keith Packard4-18/+38
Removing DGA ended up breaking any drivers calling into the old xf86DiDGAInit function as it tried to see if DGA was already enabled and ended up crashing if the VT wasn't completely initialized. Oops. Also, if the driver initializes DGA itself, have the DiDGA initialization overwrite that information as the DiDGA code will call ReInit on mode detect. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-30XQuartz: Set the proper bitmap for key repeats...Jeremy Huddleston1-7/+41
XkbSetRepeatKeys lies and doesn't do what it says it will...
2009-09-30xkb: Use XkbPerKeyBitArraySize instead of hardcoded value of 32Jeremy Huddleston1-2/+2
2009-09-30dix: Fix potential memory corruption in doListFontsWithInfo.Kim Woelders1-1/+1
Signed-off-by: Kim Woelders <kim@woelders.dk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-30dix/glx/composite: consolidate visual resize in one place.Dave Airlie4-110/+76
The previous code was copied and in both cases incorrectly fixed up the colormaps after resizing the visuals, this patch consolidates the visual resize + colormaps fixups in one place. This version also consolidates the vid allocation for the DepthPtr inside the function. I'm not 100% sure colormap.[ch] is the correct place for this but visuals are mostly created in fb and I know thats not the place to be resizing them. Fixes fd.o bug #19470. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-29GLX: Enable GLX 1.4 on DRI2Ian Romanick6-7/+38
Return the minimum GLX version supported by all screens. Assume that DRI2 screens have all the required features for GLX 1.4. Assume that everyone else can only support GLX 1.2. Reviewed-by: Kristian Høgsberg <krh@redhat.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-29XQuartz: Cleaned up keymap setting for easier maintenanceJeremy Huddleston1-61/+52
(cherry picked from commit b9dfed9e88389cbd29406a20d38ee4297638649b)
2009-09-29XQuartz: Remove the redundant xquartz_resetenv_displayJeremy Huddleston2-8/+1
unsetenv(DISPLAY) takes care of this for us anyway (cherry picked from commit d2263645d839c9edeedea0835d26f1f41b37f70e)
2009-09-29XQuartz: Query the BundleIdentifier from the bundle in X11.bin rather than ↵Jeremy Huddleston1-32/+45
using the configure option. This lets X11.bin drop into any .app ... the Info.plist and Xquartz binary need to have it hardcoded still. (cherry picked from commit 9ad16b8e50b13eb6d0cd20386d07aa8d7320f671)
2009-09-29Fix ShmPutImage non-ZPixmap case.Michel Dänzer1-9/+34
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=23298 .
2009-09-29ephyr: if -parent is given, check for a trailing -screen. (#24144)Peter Hutterer2-1/+20
If -parent is given, don't open up a new window if -screen is given as well. The commandline option -screen allows to set the depth of the embedded Xephry instance, even though width and height are autoscaled on -parent. This patch checks for a -screen parameter after -parent and - if one is found - delays initializing the screen. The parent window id is stored temporarily but re-set after a -screen argument. The following command is thus valid: Xephyr -parent 1234 -screen 640x480@8 -screen 1024x768 It embeds the first 8-bit screen into window 1234 and opens up a new window for the second screen. Multiple parent arguments are possible, the screens are embedded in-order. X.Org Bug 24144 <http://bugs.freedesktop.org/show_bug.cgi?id=24144> Tested-by: Vic Lee Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-27Add (ok, fix) support for DTrace under OS XBen Byer5-8/+12
(cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2)
2009-09-27Rootless: Correct border rendering on parent-relative windowsJeremy Huddleston3-0/+48
Resurected code from the punted RootlessPaintBackground/Border and added it conditionally to miPaintWindow (cherry picked from commit cf2e3312cff3f341e9edba8c321a4ca7ffd8748e)
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 Huddleston15-49/+53
(cherry picked from commit 54000bdcbca52a2de31f7c1a1147de6d8e9dbbb8)
2009-09-27XQuartz: Nuke TSMJeremy Huddleston1-16/+0
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 29cb904e4de2411a9b6dbe68694954788f0525f7)
2009-09-27XQuartz: Fix inverse map from mode_switch to altJeremy Huddleston1-0/+4
(cherry picked from commit de6cee11e1c335a0e5f708e7641e81d3cfe52529)
2009-09-27XQuartz: Force a keymap resync on the first keypress to workaround XKB ↵Jeremy Huddleston1-0/+11
mucking with our keymap. We need to find a better way to work with XKB on this. (cherry picked from commit ceaa5c779ceed3de5ea53727649613be3133b24e)
2009-09-27XQuartz: Transition from xEvent based mieq to InternalEventJeremy Huddleston17-440/+170
(cherry picked from commit a3dbde2de87ee4f577748a8c447501a3ea462559)
2009-09-28Put tests for zero-sized strings in quotes (#24060)Peter Hutterer2-2/+2
X.Org Bug 24060 <http://bugs.freedesktop.org/show_bug.cgi?id=24060> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-28xfree86: use the DDC size if either width or height of DisplaySize is bogus.Peter Hutterer1-1/+1
If either width or height of DisplaySize is invalid, assume that the configuration is invalid and use the DDC-reported values instead. See Comment 9, Bug 9758. http://bugs.freedesktop.org/show_bug.cgi?id=9758#c9 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dave Airlie <airlied@redhat.com>
2009-09-28render: Plug a memory leak in AddGlyph. (#23286)Peter Hutterer1-21/+21
AddGlyph was missing the FreePicture() call that DeleteGlyph used, resulting in a memory leak when more than one Glyph was added in a RenderAddGlyphs request. Since the code in AddGlyph and DeleteGlyph is identical, move into a static function to avoid such mistakes in the future. X.Org Bug 23286 <http://bugs.freedesktop.org/show_bug.cgi?id=23286>
2009-09-28configure: make XNEST default to auto.Tilman Sauerbeck1-1/+1
When we're checking whether to build Xnest, we're comparing the variable to auto but before it never was assigned that. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> [Xnest was enabled to yes to increase build exposure and catch compiler errors early. The requirements to Xnest are quite low and I expect most developers have them, so Xnext will be enabled on most boxes. Anyone missing those requires probably doesn't want to build Xnest anyway.] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-28xfree86: Hurd fixSamuel Thibault1-1/+1
I hadn't paid attention that the parameters order had changed, here is a trivial patch, please apply. Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-09-27Xi: Make CopyKeyClass X_HIDDEN to avoid ugly ifdef-fuJeremy Huddleston2-3/+1
(cherry picked from commit 6d436e17a9ae7f4ce8537f3fabc052d4f07ca75f)
2009-09-26XQuartz: Stop checking version numbers of the bundle because ↵Jeremy Huddleston1-14/+0
CFBundleGetVersionNumber is gimpish (cherry picked from commit 9f5bdd89608ec12012592ff395b82e954fbb4da8)
2009-09-26XQuartz: Add pressure/tilt property labelsJeremy Huddleston1-0/+3
(cherry picked from commit 84ea67130ef6b4086042aad6036ce66f93ea3e56)
2009-09-26XQuartz: Fix a brain-o array indexing problemJeremy Huddleston1-3/+3
/bop Peter (cherry picked from commit 494a6b046a258ad83dc98eb92b7c3d8f1d2626bb)
2009-09-26XQuartz: Nuke duplicate locks that make painful headachesJeremy Huddleston1-2/+0
(cherry picked from commit 1dd56322bd1722f2427fb2d833c5608248b60cf0)
2009-09-26Xi: CopyKeyClass is not static for XQuartzJeremy Huddleston1-1/+4
(cherry picked from commit 85d6402354cdf143c6490f2725744c2f08b5605b)
2009-09-26XQuartz: Use internal xshm header for new xextprotoJeremy Huddleston1-2/+1
(cherry picked from commit 1755239330c0bdac820d88a3e06ff391d65f29be) (cherry picked from commit 697be460d0e555e2c75eed6889293650e02d423c)
2009-09-27EXA: Fix mixed pixmaps crash with missing / failing UploadToScreen hook.Michel Dänzer1-12/+14
For the recent mixed pixmaps changes, I failed to realize (or hit in my testing) a problem which can occur if the driver doesn't provide an UploadToScreen hook or provides one which can fail: There can be a crash in exaMemcpyBox() because exaCopyDirtyToFb() passes pExaPixmap->fb_ptr to exaCopyDirty(), but that's normally NULL with driver allocated pixmaps. The solution is to make exaCopyDirty*() no longer rely on pExaPixmap->fb_ptr but use pPixmap->devPrivate.ptr after PrepareAccess instead. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24167 .
2009-09-26dmx: undefine MITSHM, move undefs to miinitext.c.Kevin E Martin2-13/+12
This patch undefines MITSHM for dmx - we don't support the required screen->ModifyPixmapHeaders. All undefines are moved from dmx-config to miinitext.c, where they belong. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-26dmx: reshuffle linker order to avoid errors when MITSHM is undefined.Kevin E Martin2-5/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-26dmx: core events are always in screen coordinates when passed to GPE.Peter Hutterer1-4/+4
This fixes input in dmx, the pointer appears at the right positions to the clients now. Also mark the spot where we pass in the button state as valuator to GPE with a FIXME. (??) Tested-by: Kevin Martin Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-26configure: Unify all library defines that require a specific version.Peter Hutterer1-9/+17
This patch moves all libraries that require a specific version into a single location instead or duplicating them across the configure.ac file. Libraries that do not require specific versions are left where they are. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-26Xi: update axisVals with the right subpixel data.Peter Hutterer1-1/+1
Subpixel data in data_frac is stored as FP32.32, hence we need to get that down again before adding it to the current value. Reported-by: Thomas Jaeger Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-26EXA: Only calculate cache position once for each glyph.Michel Dänzer1-19/+23
2009-09-26EXA: Accumulate arbitrary number of glyphs without flushing.Michel Dänzer1-25/+22
2009-09-26EXA: Try to minimize UploadToScreen calls for mixed pixmaps.Michel Dänzer4-3/+35
If there are several software fallbacks affecting the system memory copy of the same pixmap, only copy the results back to the driver pixmap when it's used for acceleration again, or in the BlockHandler, whichever happens first.
2009-09-26EXA: Extend mixed pixmaps scheme to allow driver PrepareAccess hook to fail.Michel Dänzer6-216/+232
If the PrepareAccess hook fails, use the DownloadFromScreen hook to retrieve driver pixmap contents to a system RAM copy, perform software rendering on that and copy the results back using the UploadToScreen hook. Use the classic migration logic to minimize transfers (which as a bonus allows slightly cleaning up some of the existing mixed pixmap code). This enables things that weren't possible before with driver-allocated pixmap storage: If some (or all) GPU pixmap storage can't be mapped directly by the CPU, this can be handled between the PrepareAccess and DownloadFrom/UploadToScreen hooks, e.g.: * Radeon KMS on big endian machines can fail PrepareAccess if the pixmap requires byte-swapping and swap bytes in DownloadFrom/UploadToScreen. * Environments where GPU and CPU don't have a shared address space at all. Here the driver PrepareAccess hook will always fail and leave all transfers between GPU / CPU storage to the Download/From/UploadToScreen hooks. Drivers which can handle all pixmaps in the PrepareAccess hook should notice little if any difference.
2009-09-24Fix build of unit tests when dtrace probes are enabledAlan Coopersmith4-2/+12
ar loses the dtrace probe magic when building static libraries, so we have to link with the .O files in order to resolve the dtrace probe symbols. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-25Require libXext >= 1.0.99.4Peter Hutterer1-9/+11
Reported-by: Tilman Sauerbeck Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>