Commit Graph

11551 Commits

Author SHA1 Message Date
Peter Hutterer
f92ba92adf Revert "dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents"
This call was supposed to have no functional changes but in some cases
DeliverDeviceEvents() was called with a uninitialised win variable.
Revert, safer than trying to sort this out otherwise.

This reverts commit 6eff14a789.

Reported-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-02-08 18:04:08 +10:00
Alan Coopersmith
ca64912c02 Namespace list api to reduce conflicts with similar system headers
Rename functions/macros from list_* to xorg_list_*
Rename struct from struct list to struct xorg_list.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
In-sed-I-trust: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-03 14:23:24 -08:00
Alan Coopersmith
1541e242d1 Stop including <sys/proc.h> from xf86_OSlib.h on Solaris
We don't need anything from that header (which defines /proc & kernel
structures for process information), and it causes some namespace conflicts.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-02-03 14:23:02 -08:00
Jeremy Huddleston
85cecd9811 XQuartz: Release all buttons and keys when deactivating
http://xquartz.macosforge.org/trac/ticket/486

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-30 14:23:08 -08:00
Jeremy Huddleston
47b457541b XQuartz: Toggle off fullscreen mode when XQuartz is hidden
http://xquartz.macosforge.org/trac/ticket/478

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-29 14:27:09 -08:00
Jeremy Huddleston
c2ba3f339f XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-29 14:27:09 -08:00
Keith Packard
052ca3f22e Bump version to 1.11.99.902 (1.12 RC2)
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-27 22:08:08 -08:00
Jeremy Huddleston
bafedb7e9b XQuartz: Bump bundle version to 2.7.2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-27 21:33:50 -08:00
Colin Harrison
8e78bbb2d2 hw/xwin: Fix spelling of 'Canadian' in winkeybd.h
The Mounties always get their typo

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-27 11:57:36 +00:00
Colin Harrison
80c073352a hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition()
Commit 3b36fd1b49 changed miPointerSetPosition()
to take co-ordinates as doubles, not ints, so this code as it stands is now wrong
(if it ever was correct in the first place :-))

It's unclear that we can safely promote x,y to doubles, apply miPointerSetPosition()
which potentially constrains the cursor, and then convert back to ints.

Fortunately, this whole dance seems to be unnecessary, and we can simply remove the
call to miPointerSetPosition() entirely, and just QueuePointerEvents() like any other
input driver.

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-27 11:52:14 +00:00
Colin Harrison
ced9db6595 hw/xwin: Ignore WM_DISPLAYCHANGE messages with 0 bpp
Ignore WM_DISPLAYCHANGE messages which indicate bpp is changing to 0.
That has no defined meaning I can find, but some graphics card drivers
appear to generate it on suspend/resume or screensaver activate/deactivate.

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-26 14:45:02 +00:00
Jon TURNEY
bea6fb6c7a hw/xwin: Avoid WIN_WINDOW_PROP races during Windows window destruction
The WIN_WINDOW_PROP is removed during WM_DESTROY handling, so it is not neccessary to
remove it in winDestroyWindowsWindow(), and doing so opens a race condition, as we may
attempt to access that property in the wndproc before the WM_DESTROY has completed.

A specific example of that race is if a WM_KILLFOCUS occurs in the window between property
removal and WM_DESTROY processing, where we will attempt to apply DeleteWindowFromAnyEvents()
on an invalid (null) WindowPtr.

Also guard against null WindowPtr in the WM_KILLFOCUS handler

See http://cygwin.com/ml/cygwin-xfree/2012-01/msg00009.html

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:31 +00:00
Jon TURNEY
9a709d5028 hw/xwin: Handle more motif window decoration hinting
Handle the MWM_DECOR_MINIMIZE, MWM_DECOR_MAXIMIZE and MWM_DECOR_MENU
decoration hints in a _MOTIF_WM_HINTS window property

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:30 +00:00
Oliver Schmidt
b8b0b841a0 hw/xwin: Fix AltGr key sometimes firing an additional Ctrl-L key
I also had problems with the AltGr key. These could reliably
be reproduced by holding the AltGr for some seconds (causing
Windows generating auto repeat events)

I discovered that the mechanism in winkeybd.c function
winIsFakeCtrl_L had a problem if PeekMessage cannot obtain
the next Alt_R message because it is not there yet.

I prepared a patch that remembers the last Ctrl_L event and
reacts on a later Alt_R.

It was also necessary to alter the order in winWindowProc() in
winwndproc.c: the invocation of winIsFakeCtrl_L had to be done
before discarding auto-repeated key presses, as winIsFakeCtrl_L()
now has an internal state which must be updated by all key events.

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:28 +00:00
Jon TURNEY
3d3114d55a hw/xwin: Handle the virtual key code generated by the Fn key on IBM Lenovo laptops
Apparently, IBM Leonovo laptops can generate a key-press event for the Fn
key, with virtual key code 0xFF and scan code extended 0x63

Handle this specially, rather than just passing on key code 0x63 (delete),
so you don't delete what you just typed when you adjust the screen brightness,
etc. :-)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:26 +00:00
Jon TURNEY
74af860f9a hw/xwin: turn on -emulate3buttons if less than 3 mouse buttons are reported
Try to be more intelligent with default options, turn on -emulate3buttons by
default if less than 3 mouse buttons are reported by Windows

Also, add -noemulate3buttons option so this default setting can be reversed
if desired

Also, correctly report the number of mouse buttons windows is reporting, rather
than always at least 3

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:25 +00:00
Jon TURNEY
c0f3709501 hw/xwin: In multiwindow mode, don't grab native input focus for new windows which hint they don't want it
In multiwindow mode, avoid grabbing the input focus for newly
created windows which have InputHint FALSE

(this is used by e.g. glean to avoid every test window grabbing
the focus)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:23 +00:00
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