Commit graph

8714 commits

Author SHA1 Message Date
Luc Verhaegen
7ef49cbe70 [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>
(cherry picked from commit 0e084d8c71)
2009-12-03 10:17:34 +10:00
Peter Hutterer
21bf1de28c 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>
(cherry picked from commit c20c889727)
2009-12-03 10:17:29 +10:00
Peter Hutterer
e840999ffc 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>
(cherry picked from commit 66bb8c6fbd)
2009-12-03 10:17:29 +10:00
Peter Hutterer
51aad8bebc 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>
(cherry picked from commit b584c224a8)
2009-12-03 10:17:29 +10:00
Peter Hutterer
abb0a5c11e 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>
(cherry picked from commit 761ae22f88)
2009-12-03 10:17:28 +10:00
Gaetan Nadon
b8623569a3 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>
(cherry picked from commit 91c1bd78f7)
2009-12-03 10:17:28 +10:00
Michel Dänzer
dde1f68800 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>
(cherry picked from commit 8754db77d8)
2009-12-01 16:45:52 +01:00
Ben Skeggs
17a1614c3b EXA: fix mixed-pixmaps issue where we could do accel with pixmap mapped
The problem occurs in the following situation:

1. Create Pixmap
2. Software fallback on pixmap: pExaPixmap->pDamage created
3. Accel to pixmap: driver pixmap created, exaPixmapIsOffscreen() now true
4. Software fallback on pixmap
4.1: PrepareAccess() from driver succeeds, so no DFS to system memory copy
4.2: Software rendering...
4.3: (pExaPixmap->pDamage && exaPixmapIsOffscreen()) is true, so we try
     to (incorrectly) UTS the data back to the driver pixmap, when we
     should just call the driver's FinishAccess() hook.
4.4: fail

The patch adds an additional check on pExaPixmap->offscreen, which should
(for the cases exaPixmapIsOffscreen() will return true) only be FALSE
when we haven't used PrepareAccess() on the pixmap.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Acked-By: Michel Dänzer <michel@daenzer.net>

[ Michel Dänzer: This is a 'backport' of commit
  647b79f87a from master - actually this patch
  was submitted first but didn't apply to master anymore, so technically the
  other change is a 'forward port' of this one ]
2009-12-01 16:43:09 +01:00
Aaron Plattner
155e61a9f0 Restore ABI by reintroducing the "is_src" paramter to image_from_pict.
Restores old ABI after 196aff9b18.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-11-30 11:17:32 +10:00
Peter Hutterer
1fff1b37a9 xserver 1.7.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-11-27 14:58:58 +10:00
Aaron Plattner
196aff9b18 Bug #25136: Revert "Fix clipping when windows are used as sources"
That change causes lib(w)fb to make accelerated driver calls after the driver
has entered a software fallback.  Most drivers don't expect this, which leads to
corruption or crashes.  A change to make this code do the copy in software is
unacceptably slow.

This reverts commit e9aa61e9f0.

Conflicts:

	configure.ac
	fb/fbpict.c

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-11-26 15:41:46 +10:00
Peter Hutterer
8eca8eaef5 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>
(cherry picked from commit 1b127ab842)
2009-11-25 15:26:38 +10:00
Peter Hutterer
9998105a38 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>
(cherry picked from commit 8806375ed7)
2009-11-25 15:26:35 +10:00
Rami Ylimaki
18dcc102ac 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>
(cherry picked from commit eb967ca36c)
2009-11-25 15:26:30 +10:00
Peter Hutterer
b8904935bb 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>
(cherry picked from commit a30e739a14)
2009-11-25 15:26:11 +10:00
Zhao Yakui
a5308ceb12 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>
(cherry picked from commit 19f7c15e20)
2009-11-25 15:26:07 +10:00
Jeremy Huddleston
b466329c11 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>
(cherry picked from commit 4677b5a800)
2009-11-23 22:31:04 -08:00
Peter Hutterer
19b24f014f xserver 1.7.1.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-11-20 15:29:05 +10:00
Julien Cristau
bebf7b1a34 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>
(cherry picked from commit 30be7ceaf2)
2009-11-19 16:37:03 +10:00
Chase Douglas
e6872c89bc Move FD_CLR above pInfo->read_input
The event fd may be invalidated by the pInfo->read_input call. If it is
invalidated, the subsequent FD_CLR call will segfault. Thus, the FD_CLR
call must precede the pInfo->read_input call.

Signed-off-by: Chase Douglas <chasedouglas@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b5aa2e0a5f)
2009-11-19 16:36:42 +10:00
Peter Hutterer
a2e4bcc2a0 dix: increase default number of buttons to 10.
Currently the XTEST device is limited to the same number of buttons the core
device has. This breaks if a user has a mouse with more than 3 buttons
connected and is using a core client to fake button 8+ presses.

Rather than expecting all clients to fix themselves, just increase the
default number of buttons to 10, which is somewhat a compromise. Ideally,
the XTEST devices should adjust themselves to the highest number of buttons
available on the slave devices (like the master pointers already do), but
that's a taks for another day.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 982f6648fd)
2009-11-19 16:36:34 +10:00
Jon TURNEY
2b9ad70196 Avoid a null dereference if IFF_BROADCAST is set but there is no broadcast address
It seems that the getifaddrs() function can return interfaces with
IFF_BROADCAST & IFF_UP set, but no broadcast address (at least
under Cygwin 1.7, this seems to happen for v6 mapped v4 addresses)

Avoid a null dereference if this ever happens

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 28eb61fc04)
2009-11-19 16:34:19 +10:00
Colin Harrison
71f4b404c0 Xming: Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion()
Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion(), as
they are in screen coordindates and may need to be scaled to the axis range
appropriately

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
(cherry picked from commit 019a601de6)
2009-11-19 16:33:52 +10:00
Jon TURNEY
f0325c2f60 Cygwin/X: Remove a couple of extraneous '\n' in logged version info
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
(cherry picked from commit 2a38f7c0db)
2009-11-19 16:33:37 +10:00
Adam Jackson
20beb2580f randr: Fill in errorValue when verifying outputs/crtcs/modes
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c7d1319872)
2009-11-19 16:33:26 +10:00
Dave Airlie
2db157924b loader: actually stat something that has some chance of existing. (v2)
FindModuleInSubdir seems to expect a / at the end of the subdir its
finding for, so we add the / early, the stat will fail if its
not a subdir, I'm leaving the S_ISDIR in just in case there is another
reason it could return 0. This does look a bit silly in strace
but it seems to work fine.

I have a very intermittent issue where drivers loses its / that
I've been seeing on/off for a while, this may or may not fix it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit d85ab6b648)
2009-11-19 16:33:16 +10:00
Jeremy Huddleston
7e7e7935ee XQuartz: Explicitly pass a bellProc to make XBell() work again.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
(cherry picked from commit 9071b0d697)
2009-11-15 11:03:39 -08:00
Jeremy Huddleston
d6495bb272 XQuartz: pbproxy: Wait for the server to finish starting up, so display is valid.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
(cherry picked from commit e87a03fd53)
2009-11-15 11:03:33 -08:00
Jeremy Huddleston
909d04000c XQuartz: Buildfix for Leopard and older
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
(cherry picked from commit 15fc56addc)
2009-11-15 11:03:16 -08:00
Jeremy Huddleston
afc7663f0d XQuartz: Cleanup X11Controller.m compilation warnings.
Declare X11Controller as implementing NSTableViewDataSource.
Use selectRowIndexes:byExtendingSelection instead of selectRow:byExtendingSelection

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
(cherry picked from commit 840a68dc5e)
2009-11-06 11:01:07 -08:00
Jeremy Huddleston
6b70e145b7 XQuartz: Use dixLookupResourceByType instead of LookupIDByType
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
(cherry picked from commit 0e3ad44c3b)
2009-11-06 11:00:47 -08:00
Jeremy Huddleston
f203963678 XQuartz: Don't weed out duplicates in generated keymap
There seems to be an issue in the 1.5+ server where shift-space does not
produce a space when 'keycode 57 = space' but it does when 'keycode 57 = space
space'

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
(cherry picked from commit 069fc6ce0a)
2009-11-06 11:00:38 -08:00
Jeremy Huddleston
dfb0c50294 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>
(cherry picked from commit 6d6e8fb27f)
2009-11-06 11:00:32 -08:00
Peter Hutterer
2d55b842b8 xserver 1.7.1.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-11-06 14:41:19 +10:00
Alan Coopersmith
4fe904f2d5 Enable XF86PM on all Solaris platforms, not just x86/x64
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit f7b375bd14)
2009-11-06 14:41:19 +10:00
Alan Coopersmith
f0dc842b14 Use $(MAKE) instead of "make" to build Solaris inline assembly
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit f77262513e)
2009-11-06 14:41:19 +10:00
Tiago Vignatti
05d6672a1b EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_driver
It crash the server when the drawable is 32 bit and the framebuffer is 16.

This is pretty much a copy-past from commit 8e873185.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9640407643)
2009-11-06 14:27:35 +10:00
Rami Ylimaki
269202982d dix: Fixes a memory leak when a cursor resource is released.
Just open and close a client that creates cursors in order to
reproduce. In the problem case bits->refcnt is -1 and therefore
bits->devPrivates is never released.

Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 0573042cdd)
2009-11-06 14:27:02 +10:00
Jeremy Huddleston
ade4636c7e dix: Properly detect if the other device is frozen
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
(cherry picked from commit 7897b6c2d4)
2009-11-04 11:34:28 -08:00
Jeremy Huddleston
ccbf949abb XQuartz: Run xmodmap after programatically updating the keymap.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
Signed-off-by: Martin Otte <otte@duke.edu>
(cherry picked from commit 5e79976c13)
2009-11-04 11:34:16 -08:00
Maarten Maathuis
9e9ff04320 exa: remove some outdated comment
- This comment is still in exa_driver.c and there it makes sense.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 412c56ef33)
2009-11-03 13:27:37 +10:00
Adam Jackson
30572be7c7 EDID: Extend the HDTV hack to handle "1368x769"
Hate televisions so much.

Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit ec98d7fc78)
2009-11-03 13:27:07 +10:00
Adam Jackson
9c87ede1d6 modes: Fix duplicate detection, and do it more consistently
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 7c0803f555)
2009-11-03 13:26:44 +10:00
Adam Jackson
f61376b136 modes: De-duplicate a clock range check.
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit ba2d39dd54)
2009-11-03 13:26:37 +10:00
Adam Jackson
263d2b05d6 EDID: Fix interlaced detailed timings to be frame size, not field size
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 25236d19e6)
2009-11-03 13:26:30 +10:00
Jamey Sharp
4caa7982ef Suppress certain GCC warnings in auto-generated code.
- Don't warn for references to deprecated functions in xorg_symbols.
- Ignore functions generated by gl_apitemp.py that are never used.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit fab74d1081)
2009-11-03 13:25:51 +10:00
Jamey Sharp
6ca6283bce Don't cast double to int: use default conversions or explicitly round.
GCC warns about casting a double return value to int.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 239435875d)
2009-11-03 13:25:44 +10:00
Jamey Sharp
ebbac19550 Suppress GCC warnings like "the address of u1' will always evaluate as true'".
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit e8c48fd8f7)
2009-11-03 13:25:38 +10:00
Mikhail Gusarov
171dc59ec5 kdrive: Grab evdev mouse/keyboard devices when X server is active
Input events are directed to both vt and input devices by default.
Unless input devices are grabbed, keyboard events fill it vt buffers
and cause spontaneous wakeups in kernel tty layer when buffers are full.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 662594aeff)
2009-11-03 13:25:35 +10:00
Tormod Volden
9ed5acec41 xfree86: Fix description of DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE
The message ending up in the log is misleading as to what the quirk
actually does: It ignores the sizes in the detailed timings and
replaces them with the display "Max Image Size".

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 757c11630d)
2009-11-03 13:20:16 +10:00