Commit Graph

8912 Commits

Author SHA1 Message Date
Tomas Carnecky
92d9cb7e13 XkbWriteCountedString(): return early if str is NULL
This avoids NULL from being passed to memcpy() later in the code. While
that wasn't an issue before - that value being NULL implied 'size == 0'
so memcpy() wouldn't try to dereference it - it made the code harder
to read and also confused clang.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-11 11:37:36 +10:00
Michel Dänzer
df2635d464 EXA/mixed: Don't consider devKind for detecting dimension change.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=25536 .

There should be no reason for the pitch to actually change when none of the
other dimensions do, and this could lead to incorrectly freeing the system
memory copy when allocating a GPU copy, resulting in loss of valid pixmap
contents.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Acked-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-10 09:11:14 -08:00
Jeremy Huddleston
97a6454ea5 XQuartz: pbproxy: Fix building of standalone xpbproxy executable
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-09 18:27:31 -08:00
Jeremy Huddleston
1b8f90aa8b Miscellaneous compilation warning fixes
main.c:134: warning: no previous prototype for 'dix_main'
rootlessScreen.c: In function 'RootlessMarkOverlappedWindows':
rootlessScreen.c:434: warning: function declaration isn't a prototype
backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int'
backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int'
set.c: In function 'RecordSetMemoryRequirements':
set.c:413: warning: old-style function definition
set.c: In function 'RecordCreateSet':
set.c:425: warning: old-style function definition
stub.c: In function ‘main’:
stub.c:236: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-08 15:50:28 -08:00
Michel Dänzer
955b9f23a3 EXA: ModifyPixmapHeader_mixed fixes.
* Better detection of dimension changes.
* Make sure to re-create the system memory copy when the pixmap dimensions
  change (e.g. the screen pixmap on screen resize).
* Clear the valid regions.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Acked-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-08 13:06:42 -08:00
Michel Dänzer
c1503861cf EXA: ExaDoPrepareAccess return value fixes.
Only return TRUE if the GPU copy is being accessed, and preserve the return
value on repeated / nested calls for the same pixmap.

exaPrepareAccessReg_mixed could get inconsistent return values e.g. when the
same pixmap is both the destination and source of an operation, potentially
resulting in a crash.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Acked-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-08 13:06:37 -08:00
Maarten Maathuis
fd86738733 exa/mixed: pixmaps that succeed prepare access have no need for a cpu copy
- When they have a gpu copy ofcource.
- Use the presence of a cpu copy as a hint to fall back instead of UTS'ing in
exaHWCopyNtoN.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-04 22:10:13 -08:00
Michel Dänzer
bb7acfbcfb EXA: Use correct coordinate system for calculating Composite fallback region.
Fixes incorrectly skipped rendering of some Composite operations to windows.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-04 07:46:15 -08:00
Maarten Maathuis
0f4ef7123d exa/mixed: setting devKind before exaCopyDirty* is not needed
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-03 16:45:08 -08:00
Maarten Maathuis
8ea415d417 Revert "exa: a few small pitch related changes"
This reverts commit 99d88ef69d.

- Some pixmaps under classic have a sys_pitch which is 0, no idea why. This is
causing rendering corruption.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-03 08:41:48 -08:00
Keith Packard
98c8b75225 Merge remote branch 'whot/master' 2009-12-02 15:28:07 -08:00
Gaetan Nadon
91c1bd78f7 configure.ac: error while checking for XDMXCONFIG_DEP
Introduced in commit 9998105a38
The replacement third parameters to PKG_CHECK_MODULES([DMXMODULES]
was not quoted.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-03 08:44:02 +10:00
Peter Hutterer
761ae22f88 xfree86: tell users to disable AutoAddDevices, not AllowEmptyInput.
Technically, disabling AEI is the right suggestion. AEI off forces the
server to init the built-in defaults for input devices (or pick the first
one from the config file). At the same time, hotplugging is still available
with AEI off.

Unfortunatly, in the vast majority of cases users want to simply disable
hotplugging or have a working server while the local HAL configuration is
broken or missing. Disabling AEI will lead to duplicate events, triple
keystrokes, etc. once the configuration works again.
It's not actually required to remove AEI once hotplugging works again,
though it will in many cases lead to a setup that appears broken.

Asking users to disable AutoAddDevices instead means those users disable
hotplugging, can then fix the HAL setup and they _must_ remove the config
line again to test if hotplugging works again. Which doesn't leave them with
a broken config once everything is working nice and dandy. Less bugreports,
everybody wins.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Rémi Cardona <remi@gentoo.org>
Acked-by: James Cloos <cloos@jhcloos.com>
2009-12-03 08:43:46 +10:00
Peter Hutterer
b584c224a8 Set the source and deviceid for key repeat events (#24785)
X.Org Bug 24785 <http://bugs.freedesktop.org/show_bug.cgi?id=24785>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Adam Jackson <ajax@redhat.com>
2009-12-03 08:24:04 +10:00
Peter Hutterer
66bb8c6fbd dix: remove core devices when shutting down. (#25028)
NewInputDeviceRequest (and RemoveDevice) have checks in place to not allow
removal of the VCP/VCK. When shutting down, they need to be cleaned up
nonetheless to free the memory associated.

X.Org Bug 25028 <http://bugs.freedesktop.org/show_bug.cgi?id=25028>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-03 08:24:04 +10:00
Peter Hutterer
83d90b90bc dix: remove some obsolete comment.
The "counterpart to biggest hack" included checking for the motion history
function - which is unified in 1.7. Hence the check (which is already
removed) would evaluate to true anyway, and this comment isn't needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-03 08:24:03 +10:00
Peter Hutterer
c20c889727 dix: fix memory leak, free event list on shutdown. (#25028)
X.Org Bug 25028 <http://bugs.freedesktop.org/show_bug.cgi?id=25028>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-03 08:23:53 +10:00
Luc Verhaegen
0e084d8c71 Xv: Fix AdjustFrame when driver implements ReputImage.
Should probably also be applied to stabler xserver branches too.

Luc Verhaegen.

From a22bc20721bad506d8fa9772b1258568cbffe7d2 Mon Sep 17 00:00:00 2001
From: Luc Verhaegen <libv@skynet.be>
Date: Wed, 11 Nov 2009 15:52:39 +0100
Subject: [PATCH] Xv: Fix AdjustFrame when driver implements ReputImage.

Finally fixes fd.o #4653, filed more than 4 years ago.

Patch can be happily applied to all modular Xorg versions.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-02 08:41:03 -08:00
Jeremy Huddleston
f4fc340672 XQuartz: Drop calls to alloca
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-11-30 17:06:58 -08:00
Michel Dänzer
66a9616d64 fb: Don't crash if copy_drawable() returns NULL.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24634 .

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-30 08:37:12 -08:00
Michel Dänzer
8754db77d8 EXA: Don't defragment offscreen memory at allocation time.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24300 .

Offscreen memory allocation can occur from various places, and apparently
doing defragmentation from at least some of them can confuse some driver
acceleration code.

There's still the regular background defragmentation in the WakeupHandler,
which should manage to keep fragmentation at a reasonable level.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-30 08:37:06 -08:00
Michel Dänzer
0e555a1033 Revert "EXA: Accumulate arbitrary number of glyphs without flushing."
This reverts commit c11678cc18.

Not sure what I was thinking, turns out alloca() of a size derived from client
input is a bad idea.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-30 08:36:54 -08:00
Maarten Maathuis
99d88ef69d exa: a few small pitch related changes
- Setting pitch before exaCopyDirty* is not needed.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-28 12:45:08 -08:00
Maarten Maathuis
a54c23fe64 exa: s/PixmapIsOffscreen/PixmapHasGpuCopy and s/pExaPixmap->offscreen/pExaPixmap->use_gpu_copy
- Fixup some variable names as well.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-28 12:44:58 -08:00
Maarten Maathuis
342f3689d1 exa: handle pixmap create/destroy in lower layers
- Pixmaps that are created during a fallback are automatically prepared access.
- During the fallback accelerated ops are blocked to prevent new/scratch gc's
  from triggering accelerated ops on mapped pixmaps.
- A few cases of incorrect wrapping (on the top level pointer instead of
  between damage and (w)fb) have been removed.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-28 12:44:21 -08:00
Ingmar Vanhassel
b54bc14ce0 Update man-pages for new default font paths
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-25 13:34:36 -08:00
Ingmar Vanhassel
c0367028ac Update COMPILEDDEFAULTFONTPATH to match the new default font path
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-25 13:34:23 -08:00
Peter Hutterer
0e6cee853d dix: clean up accel old scheme data when switching schemes.
InitValuatorClassDeviceStruct always initializes with the default profile.
The default profile allocs data and adds a few properties which become
obsolete if the profile is changed lateron by the driver.

The property handlers are stored in the device's devPrivates and cleaned up.
Ideally, the property handler ID's could be stored somewhere more obvious,
but that seems to require breaking the ABI.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Simon Thum <simon.thum@gmx.de>
2009-11-25 10:57:07 +10:00
Peter Hutterer
1b127ab842 Xi: when deleting all properties, reset property handler to NULL.
Trying to unregister property handlers during the device closure process
leads to invalid memory accesses.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-11-25 10:57:07 +10:00
Peter Hutterer
8806375ed7 Move xdmxconfig modules into DMX conditionals (#25102)
xdmxconfig requires additional modules not checked for if Xdmx build is set
to auto (the default). This may lead to build errors if the Xdmx modules are
installed, but not the extra ones required for xdmxconfig.

X.Org Bug 25102 <http://bugs.freedesktop.org/show_bug.cgi?id=25102>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Remi Cardona <remi@gentoo.org>
Acked-by: Julien Cristau <jcristau@debian.org>
2009-11-25 10:57:07 +10:00
Peter Hutterer
a2adda7ab3 Revert "Move xdmxconfig modules into DMX conditionals (#25102)"
New package dependency unnecessarily links in a few libraries that Xdmx
doesn't need. This can be fixed more elegantly.

This reverts commit 0ef15ca9d2.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-11-25 10:57:03 +10:00
Rami Ylimaki
eb967ca36c Xext: Fix a memory leak on GE client disconnect.
Add a call to dixRequestPrivate to inform dixFreePrivates that memory
allocated in GEClientCallback should be released when client
disconnects. Otherwise there is a leak of sizeof(GEClientInfoRec) for
every client connect/disconnect.

Also remove the explicit allocation and let GEGetClient /
dixLookupPrivate do it. This makes GEClientCallback similar to the
other extension callbacks.

Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-11-25 10:55:22 +10:00
Maarten Maathuis
55f60e1923 Revert "exa/mixed: be more thorough about setting fb_pitch when needed"
This reverts commit d4fc245115.

- This is causing crashes/problems for some.

Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-24 00:38:52 -08:00
Jeremy Huddleston
4677b5a800 XQuartz: Allow better compatability with older versions of xinit
If we are id="org.x" and the launchd socket is ":0", we will claim
the socket to match the old behavior before we prefixed the
socket name with our id.

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-23 18:00:31 -08:00
Tiago Vignatti
ec16357eda configure: remove unused kdrive Xvesa config variable
Xvesa was gone in commit 6d21fbf0 and this should be there as well.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23 07:53:45 -08:00
Peter Hutterer
a30e739a14 Xi: don't crash when deleting invalid device properties.
Deleting a property that was not set on a device leads to a null-pointer
reference. The protocol allows deleting those properties - it has to be a
noop.

Reproducible:
xinput --set-prop "My device" --type=int --format=8 "my property" 1
xinput --delete-prop "My other device" "my property"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-22 19:42:13 -08:00
Zhao Yakui
19f7c15e20 xfree86: Edid quirk for Philips LCD LP154W01
v1->v2: Make one condition case for one quirk instead of merging them
together. This is based on the Keithp's suggestion.

Move the EDID quirk for Philips LCD LP154W01 as the panel reports the vertical
size in cm.

https://bugs.freedesktop.org/show_bug.cgi?id=24482

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-20 07:21:26 -08:00
Michel Dänzer
b8b8db9835 EXA: Don't use UploadToScreen for CopyNtoN with mixed pixmaps.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-11-19 11:39:27 -08:00
Maarten Maathuis
d4fc245115 exa/mixed: be more thorough about setting fb_pitch when needed
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
2009-11-18 13:32:56 -08:00
Maarten Maathuis
647b79f87a exa/mixed: avoid copying back pixmap data when no migration took place
- When the driver handles the prepare access no copying is needed.
- Delayed pixmap creation should be fine, because it's handled by the
  first prepare access, but the exaPixmapIsOffscreen check in finish access
  will return FALSE without a driver pixmap.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
2009-11-18 13:28:41 -08:00
Julien Cristau
30be7ceaf2 xfree86: set a sane umask before opening the log
Xorg creates its log file following the umask of the user running
startx, which may result in a world-writable log.  Set umask to 022 to
prevent this.

Debian bug#555308 <http://bugs.debian.org/555308>
See also http://thread.gmane.org/gmane.comp.security.oss.general/2299

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-17 12:55:44 -08:00
Matt Turner
fb95090730 Use glibc's in/out routines
Let's let glibc do the right thing for dense/sparse selection.

The _alpha_iobase code has been unused since the switch to libpciaccess. It
really should have been killed by fba700f1f6.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-16 20:17:29 -08:00
Peter Hutterer
0ef15ca9d2 Move xdmxconfig modules into DMX conditionals (#25102)
xdmxconfig requires additional modules not checked for if Xdmx build is set
to auto (the default). This may lead to build errors if the Xdmx modules are
installed, but not the extra ones required for xdmxconfig.

X.Org Bug 25102 <http://bugs.freedesktop.org/show_bug.cgi?id=25102>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-16 20:14:34 -08:00
Paulo Ricardo Zanoni
df95be4d3d configure: change 'sigio-default' to 'use-sigio-by-default'
This was discussed in this thread:
http://lists.x.org/archives/xorg-devel/2009-September/002025.html
The patch sent fixed the help string but not the configure option.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-13 16:55:14 -08:00
Gaetan Nadon
801f0e5980 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Add missing INSTALL file. Use standard GNU file on building tarball
README may have been updated
Remove AUTHORS file as it is empty and no content available yet.
Remove NEWS file as it is empty and no content available yet.

Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-11 21:44:24 -08:00
Gaetan Nadon
c93f516e85 Deploy the new XORG_DEFAULT_OPTIONS #24242
This macro aggregate a number of existing macros that sets commmon
X.Org components configuration options. It shields the configuration file from
future changes.

Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-11 21:44:01 -08:00
Gaetan Nadon
0f38159cdd Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
ChangeLog filename is known to Automake and requires no further
coding in the makefile.

Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-11 21:42:01 -08:00
Gaetan Nadon
c739beb439 .gitignore: use common defaults with custom section #24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.

Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-11 21:40:20 -08:00
Jeremy Huddleston
9071b0d697 XQuartz: Explicitly pass a bellProc to make XBell() work again.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-11 18:00:19 -08:00
Jeremy Huddleston
e87a03fd53 XQuartz: pbproxy: Wait for the server to finish starting up, so display is valid.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-11 18:00:19 -08:00