Commit Graph

11584 Commits

Author SHA1 Message Date
Jon TURNEY
25caa8565d hw/xwin: Remove some redundant OS version reporting
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:20 +00:00
Roland Cassard
a9aca218f5 hw/xwin: Don't assume we'll always have converted the clipboard selection after 2 attempts
Rather than knowing we have to call winProcessXEventsTimeout() for up to 2 WIN_XEVENTS_CONVERT messages, process
all messages in winProcessXEventsTimeout() until either: (i) the time out expired, (ii) an error occurred, or
(iii) received a WIN_XEVENTS_NOTIFY messaage indicating the data has been to put on the clipboard.

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:38:52 +00:00
Michel Hummel
75fe336b6c hw/xwin: Mitigate a race condition in clipboard thread initialization
Remove the variables g_fClipboardLaunched and g_fClipboardStarted from
winInitializeGlobals(), as their re-initialization is handled in the
file hw/xwin/InitOutput.c.

Re-initializing g_fClipboardLaunched and g_fClipboardStarted during
the server reset procedure can lead to the clipboard thread being
launched two times and sometimes leads to a crash of the X server...

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:10:48 +00:00
Jon TURNEY
95b1391fe3 hw/xwin: Chain IOError handlers to avoid longjmp across threads
Avoid crashes on shutdown due to the undefined behaviour of calling longjmp() on the
result of setjmp() from a different thread, by chaining IOError handlers and only
jumping back up to the frame for this thread

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:10:24 +00:00
Yaakov Selkowitz
0659437f5e hw/xwin: Improve XWinrc loading and error recovery
If $HOME/.XWinrc is present but badly formed, ignore it and try
system.XWinrc instead.  If neither file is present or both are badly
formed, provide a built-in default which gives the user the chance to
load their new or fixed configuration without restarting.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:10:12 +00:00
Michel Hummel
47c7b6d3e6 hw/xwin: Remove no-longer needed tricks used to prevent the clipboard client from being killed
Remove no-longer needed tricks used to hide the clipboard client from XDM to prevent
it from being killed

- Delete XQuery wrapper used to hide clipboard client
- Delete XDMCP mode heuristic which waits until some magic number of connections have
been established before starting the clipboard

We still need the EstablishConnection wrapper to ensure that the clipboard client isn't
the first client (causing a server restart if it disconnects)

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:09:35 +00:00
Michel Hummel
c1bf3baa44 hw/xwin: Automatically restart clipboard thread
Automatically restart clipboard thread on unexpected exit

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:09:02 +00:00
Jon TURNEY
ae981341a9 hw/xwin: Give the X window for the clipboard integration client a name
This makes it a bit easier to find when staring at the output of
'xwininfo -tree -root'

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 13:42:06 +00:00
Jon TURNEY
b1093241f3 Xext: Warning fix for shm.c
shm.c: In function 'CheckForShmSyscall':
shm.c:182:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 13:41:42 +00:00
Adam Jackson
02775efb89 int10: Fix unmapping of the BIOS scratch area
342f3eac84 introduced a bug, 'base' is
incremented before use.  The old code corrected this when unmapping, so
the new code should too.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-25 09:26:23 -08:00
Chase Douglas
e1085a0da0 Don't set X and Y valuators for indirect touch events
For expediency, it made sense to always have the X and Y axes set for
direct touch device event propagation. The last X and Y values are
stored internally. However, indirect device touch event propagation
does not depend on the touch's X and Y values. Thus, we don't need to
set the values for every indirect touch event.

On top of this, the previous X and Y values aren't stored for indirect
touches, so without this change the axes get erroneously set to 0.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-24 13:27:30 +10:00
Daniel Stone
5201310559 UngrabAllDevices: Don't kill clients if not told to
The kill_client argument to UngrabAllClients specifies if we want to
kill the client holding the grab or just deactivate the grab.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reported-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-24 13:26:37 +10:00
Chase Douglas
9b1e18f42a Only update pointer motion data for pointer emulated touch events
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-24 13:26:36 +10:00
Chase Douglas
f00e5b02f5 Only scale direct device touch coordinates
Indirect touch devices provide valuator values in pure device
coordinates. They also don't need to be fixed up for screen crossings.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-24 13:26:36 +10:00
Peter Hutterer
24dc0389da include: Fix comment typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-24 13:26:36 +10:00
Jeremy Huddleston
954bb99484 configure.ac: Remove MIEXT_SHADOW_LIB from XORG_LIBS
This is provided by dixmods/libshadow.so and is not part of the main binary.

This addresses a build failure on darwin due to MIEXT_SHADOW_LIB having
unsatisfied dependencies (FB_LIB) in XORG_LIBS.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-15 02:28:27 -08:00
Jeremy Huddleston
ba0f5cc196 xfree86: Don't link libxorgxkb against libdix.la
libdix.a is already provided by XSERVER_LIBS.  Including it in libxorgxkb
results can result in duplicate symbols landing in the Xorg binary on some
configurations (buggy glibtool on darwin).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-15 02:28:27 -08:00
Jeremy Huddleston
2387fb2385 sdksyms.sh: Exit on error rather than building an empty symbol table
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-01-15 02:28:07 -08:00
Jeremy Huddleston
cd89482088 test: Fix linking issues when building unit tests without the Xorg DDX
This allows unit tests to build and run successfully on darwin when
only the Xvfb or XQuartz DDX is built.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-15 02:28:07 -08:00
Jeremy Huddleston
78d39b3222 Revert "glx: don't leak fbconfigs"
This reverts commit d26fae246d.

This patch free()s memory in __glXScreenDestroy which was allocated in
glxdricommon (which isn't in every DDX).  That breaks abstraction and
causes a crash when XQuartz quits, because it results in freeing a pointer
that was never allocated.

The correct fix is to do this cleanup in __glXDRIscreenDestroy.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-15 02:28:07 -08:00
Chase Douglas
f9e6858d5c Use event time instead of CurrentTime for grab times
When {XI,X,}AllowEvents is called, the timestamp is compared against the
grab time to ensure that the request pertains to the current grab in the
server. While many clients may use CurrentTime (client-side), the
timestamp of the event causing the grab is also valid.

This change ensures that the server's notion of the grab time is the
time of the event that activated the grab rather than the time that the
grab is actually activated.

This bug was exposed through nested touch then pointer grabs.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-13 09:04:49 +10:00
Peter Hutterer
a6273cc85c xfree86: mention udev in the xorg.conf manpage AutoAddDevices section
And point out what "hotplugging" means.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2012-01-13 09:04:44 +10:00
Peter Hutterer
a60d87ffe6 os: prettify backtrace output
Changes to output:
* "Backtrace:" now appears on a separate line _with_ a timestamp
* A blank line is inserted after the last backtrace line

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2012-01-13 09:03:05 +10:00
Peter Hutterer
c495a839ac include: prettify BUG_WARN output
ErrorF output is prefixed with a timestamp, so the previous output would
look like this:

[ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)'
BUG: getevents.c:842 in scale_to_desktop()

Change this to have the prefix on both lines:
[ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)'
[ 50.423] BUG: getevents.c:842 in scale_to_desktop()

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2012-01-13 09:03:05 +10:00
Peter Hutterer
bbb6b8c834 render: don't bother with animated cursors on floating slaves (#39989)
X.Org Bug 39989 <http://bugs.freedesktop.org/show_bug.cgi?id=39989>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-13 09:03:04 +10:00
Peter Hutterer
35bd77e9d0 dix: Update pointer limits for floating devices too (#43635)
When the screen is restructured, the pointer limits need to be reset for
floating slave devices as well, not just for master pointers. Only skip
devices that don't have a cursor (attached slaves and keyboard)

Bug reproducer: float an absolute slave device, rotate the screen - the
device is now confined to a section of the screen only.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-01-13 09:03:04 +10:00
Keith Packard
5de0c2582f Revert "os: Repack ConnectionOutput for LP64"
This reverts commit d5f724544a.

ABI change pended for 1.13
2012-01-12 12:10:07 -08:00
Keith Packard
11331305d4 Revert "dix: Repack ClientRec"
This reverts commit f702372822.

ABI change pended for 1.13
2012-01-12 12:10:03 -08:00
Keith Packard
d9eeede52f Revert "dix: Pull client-is-local flag up to the ClientRec"
This reverts commit 49d38b75c8.

ABI change pended for 1.13
2012-01-12 12:09:59 -08:00
Keith Packard
3be37375ee Revert "dix: Extend initial connection handshake for forwarding proxies"
This reverts commit 78fa121f40.

ABI change pended for 1.13
2012-01-12 12:09:55 -08:00
Keith Packard
5b9f5c8a53 Revert "os: Hide the Connection{In,Out}put implementation details"
This reverts commit 48e7a2ef57.

ABI change pended for 1.13
2012-01-12 12:09:44 -08:00
Keith Packard
5867d453ce Revert "dix: Fix types in WindowOptRec"
This reverts commit a4553019a1.

ABI change pended for 1.13
2012-01-12 12:09:34 -08:00
Keith Packard
e722ad6c3e Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes' 2012-01-09 13:22:28 -08:00
Keith Packard
e476af417d Merge remote-tracking branch 'whot/multitouch' 2012-01-09 13:17:37 -08:00
Zhigang Gong
f4956faab9 mi/mibitblt: Fix an overflow bug of bit shift.
When depth equal to 32 and planeMask equal to 0, the overflow will
occur and cause the pixmap can't be cleared. There are some test
cases in XTS hit this bug, and this fix can eliminate the corresponding
failures.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Matthieu Herrb
6d6d4cb604 Add OpenBSD support to DetermineClientCmd()
Uses kvm_getargv() from libkvm.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Adam Jackson
a55214d119 Always install xaa sdk headers
Always install XAA SDK headers so drivers still build even with
--disable-xaa

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Matthieu Herrb
dafc327f3c UnloadSubModule(): accept pointer value '1' and ignore it.
Some driver modules try to unload submodules that are now built-in.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Adam Jackson
8db029064b vgahw: Fix DACDelay() macro to use the driver's vtable
We don't want to unconditionally use I/O routines here, since if the
driver is using mmap'd VGA ports then the I/O handle won't be set up.

Tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Chris Halse Rogers
63a8012947 Revert "dix: don't return BadMatch from GetProperty (#23562)"
This reverts commit f04fe06ae2.

dixLookupWindow no longer returns BadMatch. No other caller was checking
for it, so this problem is now fixed in the utility function.

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:48 -08:00
Chris Halse Rogers
ef492e9797 dix: Return BadWindow rather than BadMatch from dixLookupWindow
dixLookupWindow uses dixLookupDrawable internally, which returns
BadMatch when the XID matches a non-Window drawable.  Users
of dixLookupWindow don't care about this, just that it's not
a valid Window.

This is a generalised version of the fix for X.Org Bug 23562,
where GetProperty was incorrectly returning BadMatch. Auditing other
window requests, all that I checked would incorrectly return BadMatch
in these circumstances.  An incomplete list of calls that could
incorrectly return BadMatch is: ListProperties, SetSelectionOwner,
{Destroy,Map,Unmap}{,Sub}Window.

None of the callers of dixLookupWindow, except for GetProperty, check
for BadMatch

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:48 -08:00
Arthur Taylor
ff891bbf68 linux: Use K_OFF VT KB mode over K_RAW if available.
Linux kernels since 2.6.38 (March 2011) have an VT KB mode K_OFF in
which special keys (like Ctrl+C) are not interpreted and input is not
buffered. Use of this mode over K_RAW removes the need for a
xf86ConsoleHandler to drain the VT input buffer, removing the grief it
causes when it goes wrong or is (de)initialized out-of-order. (This
also saves a few needless context switches per key event.)

If K_OFF is not defined or not understood by the kernel, K_RAW and the
previous method is used as a fall-back.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Arthur Taylor <art@ified.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:48 -08:00
Keith Packard
0b113f7cdf Merge commit '777bf90abeac37087a3d0538b847742523d5acf2' 2012-01-09 13:07:25 -08:00
Keith Packard
0b2c6491c5 Merge remote-tracking branch 'whot/for-keith' 2012-01-09 11:40:23 -08:00
Keith Packard
1f5587e144 Merge remote-tracking branch 'kibi/master' 2012-01-09 11:37:59 -08:00
Jeremy Huddleston
a97252db24 XQuartz: GL: Buildfix for recent GLX changes
dispatch.h was leftover from an earlier implementation and is no longer
needed, so remove it since including it causes a build failure due to
conflicts between GL/gl.h and OpenGL/gl.h

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-08 23:23:14 -08:00
Andreas Wettstein
6b19436536 xkb: Message actions suppress other key presses #28575
When a key to which a message action is mapped is held down, presses of
other keys were not registered.

Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-09 10:51:13 +10:00
Ryan Pavlik
4e44580efd hw/xwin: Include manifest file in the dist tarball
Commit c02638fd added the manifest file, but didn't add it to EXTRA_DIST.

Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:48 +00:00
Ryan Pavlik
c763fe51b8 hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
but still provide it if building for Win32 without autotools

xserver/hw/xwin/winclipboard.h:42:0: warning: "HAS_WINSOCK" redefined
../../include/xwin-config.h:11:0: note: this is the location of the previous definition

Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:17 +00:00
Ryan Pavlik
3d80f202b0 hw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow()
Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:50:13 +00:00