meego-w40:xserver-xorg.git
6 years agoBump to version 1.11.99.903 (1.12 RC3) xorg-server-1.11.99.903
Keith Packard [Sat, 11 Feb 2012 03:13:44 +0000 (16:13 +1300)]
Bump to version 1.11.99.903 (1.12 RC3)

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoMerge remote-tracking branch 'alanc/master'
Keith Packard [Sat, 11 Feb 2012 02:36:43 +0000 (15:36 +1300)]
Merge remote-tracking branch 'alanc/master'

6 years agoXi: handle new XIAllowEvents request in inputproto 2.1.99.6
Peter Hutterer [Fri, 27 Jan 2012 02:41:09 +0000 (12:41 +1000)]
Xi: handle new XIAllowEvents request in inputproto 2.1.99.6

grab_window and touchid were removed from the struct for ABI compatibility
reasons, we need to pull in the new, XI 2.2-specific struct.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agodix: fix an out-of-memory crash
Benjamin Otte [Tue, 7 Feb 2012 08:01:25 +0000 (18:01 +1000)]
dix: fix an out-of-memory crash

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoImplement touch early accept
Chase Douglas [Sat, 4 Feb 2012 00:19:11 +0000 (16:19 -0800)]
Implement touch early accept

This doesn't really implement early accept as it should. Ideally, the
server should send end events to all subsequent touch clients as soon as
an early accept comes in. However, this implementation is still protocol
compliant. We can always improve it later.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoImplement early touch reject
Chase Douglas [Sat, 4 Feb 2012 00:19:10 +0000 (16:19 -0800)]
Implement early touch reject

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoCheck for proper window ID when processing touch allow requests
Chase Douglas [Sat, 4 Feb 2012 00:19:09 +0000 (16:19 -0800)]
Check for proper window ID when processing touch allow requests

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoMove AllowTouch to dix/touch.c, and rename to TouchAcceptReject
Chase Douglas [Sat, 4 Feb 2012 00:19:08 +0000 (16:19 -0800)]
Move AllowTouch to dix/touch.c, and rename to TouchAcceptReject

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoExport TouchEventRejected as TouchRejected
Chase Douglas [Sat, 4 Feb 2012 00:19:07 +0000 (16:19 -0800)]
Export TouchEventRejected as TouchRejected

This function is mostly correct for early reject usage. With a small
change to pass the client resource explicitly and making the
TouchOwnership event optional, it is usable for all rejection scenarios.
This change exports it for use outside Xi/exevents.c and modifies the
name accordingly.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoFactor out TouchEnd generation and delivery
Chase Douglas [Sat, 4 Feb 2012 00:19:06 +0000 (16:19 -0800)]
Factor out TouchEnd generation and delivery

The server often needs to generate and deliver TouchEnd events for
circumstances including touch grab acceptance and rejection. This change
refactors the code so it can be used more easily.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoStore window pointer in touch listener record
Chase Douglas [Sat, 4 Feb 2012 00:19:05 +0000 (16:19 -0800)]
Store window pointer in touch listener record

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoRevert "dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents"
Peter Hutterer [Sat, 4 Feb 2012 09:27:21 +0000 (19:27 +1000)]
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 6eff14a789341d366b3013c5aa020e959c954651.

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>
6 years agoNamespace list api to reduce conflicts with similar system headers
Alan Coopersmith [Fri, 27 Jan 2012 00:41:25 +0000 (16:41 -0800)]
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>

6 years agoStop including <sys/proc.h> from xf86_OSlib.h on Solaris
Alan Coopersmith [Fri, 23 Dec 2011 23:17:28 +0000 (15:17 -0800)]
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>
6 years agoXQuartz: Release all buttons and keys when deactivating
Jeremy Huddleston [Sun, 29 Jan 2012 00:06:28 +0000 (16:06 -0800)]
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>
6 years agoXQuartz: Toggle off fullscreen mode when XQuartz is hidden
Jeremy Huddleston [Sun, 29 Jan 2012 07:11:44 +0000 (23:11 -0800)]
XQuartz: Toggle off fullscreen mode when XQuartz is hidden

http://xquartz.macosforge.org/trac/ticket/478

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
6 years agoXQuartz: Localization Updates
Jeremy Huddleston [Sun, 29 Jan 2012 22:26:47 +0000 (14:26 -0800)]
XQuartz: Localization Updates

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
6 years agoBump version to 1.11.99.902 (1.12 RC2) xorg-server-1.11.99.902
Keith Packard [Sat, 28 Jan 2012 06:08:08 +0000 (22:08 -0800)]
Bump version to 1.11.99.902 (1.12 RC2)

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoXQuartz: Bump bundle version to 2.7.2
Jeremy Huddleston [Wed, 18 Jan 2012 19:52:04 +0000 (11:52 -0800)]
XQuartz: Bump bundle version to 2.7.2

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
6 years agohw/xwin: Fix spelling of 'Canadian' in winkeybd.h
Colin Harrison [Thu, 26 Jan 2012 13:28:24 +0000 (13:28 +0000)]
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>
6 years agohw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition()
Colin Harrison [Wed, 4 Jan 2012 17:16:36 +0000 (17:16 +0000)]
hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition()

Commit 3b36fd1b49030ead44358945f62e5abe7f4609ce 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>
6 years agohw/xwin: Ignore WM_DISPLAYCHANGE messages with 0 bpp
Colin Harrison [Wed, 25 Jan 2012 01:37:16 +0000 (01:37 +0000)]
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>
6 years agohw/xwin: Avoid WIN_WINDOW_PROP races during Windows window destruction
Jon TURNEY [Sun, 22 Jan 2012 19:31:51 +0000 (19:31 +0000)]
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>
6 years agohw/xwin: Handle more motif window decoration hinting
Jon TURNEY [Thu, 29 Sep 2011 14:05:27 +0000 (15:05 +0100)]
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>
6 years agohw/xwin: Fix AltGr key sometimes firing an additional Ctrl-L key
Oliver Schmidt [Mon, 5 Sep 2011 12:32:01 +0000 (13:32 +0100)]
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>
6 years agohw/xwin: Handle the virtual key code generated by the Fn key on IBM Lenovo laptops
Jon TURNEY [Thu, 30 Jun 2011 13:19:01 +0000 (14:19 +0100)]
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>
6 years agohw/xwin: turn on -emulate3buttons if less than 3 mouse buttons are reported
Jon TURNEY [Wed, 24 Mar 2010 22:41:22 +0000 (22:41 +0000)]
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>
6 years agohw/xwin: In multiwindow mode, don't grab native input focus for new windows which...
Jon TURNEY [Thu, 24 Mar 2011 20:19:47 +0000 (20:19 +0000)]
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>
6 years agohw/xwin: Remove some redundant OS version reporting
Jon TURNEY [Wed, 25 Jan 2012 13:33:39 +0000 (13:33 +0000)]
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>
6 years agohw/xwin: Don't assume we'll always have converted the clipboard selection after 2...
Roland Cassard [Sat, 23 Oct 2010 17:12:36 +0000 (18:12 +0100)]
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>
6 years agohw/xwin: Mitigate a race condition in clipboard thread initialization
Michel Hummel [Fri, 6 Aug 2010 14:23:52 +0000 (15:23 +0100)]
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>
6 years agohw/xwin: Chain IOError handlers to avoid longjmp across threads
Jon TURNEY [Mon, 5 Apr 2010 12:57:24 +0000 (13:57 +0100)]
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>
6 years agohw/xwin: Improve XWinrc loading and error recovery
Yaakov Selkowitz [Sun, 21 Feb 2010 05:40:53 +0000 (23:40 -0600)]
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>
6 years agohw/xwin: Remove no-longer needed tricks used to prevent the clipboard client from...
Michel Hummel [Sat, 23 Oct 2010 17:35:57 +0000 (18:35 +0100)]
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>
6 years agohw/xwin: Automatically restart clipboard thread
Michel Hummel [Sun, 31 Oct 2010 14:53:02 +0000 (14:53 +0000)]
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>
6 years agohw/xwin: Give the X window for the clipboard integration client a name
Jon TURNEY [Mon, 8 Feb 2010 22:37:30 +0000 (22:37 +0000)]
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>
6 years agoXext: Warning fix for shm.c
Jon TURNEY [Tue, 19 Oct 2010 19:47:21 +0000 (20:47 +0100)]
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>
6 years agoint10: Fix unmapping of the BIOS scratch area
Adam Jackson [Tue, 24 Jan 2012 22:35:04 +0000 (17:35 -0500)]
int10: Fix unmapping of the BIOS scratch area

342f3eac8460fc48cfad1f1d7be939d671e6e1cd 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>
6 years agoDon't set X and Y valuators for indirect touch events
Chase Douglas [Thu, 19 Jan 2012 03:09:21 +0000 (19:09 -0800)]
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>
6 years agoUngrabAllDevices: Don't kill clients if not told to
Daniel Stone [Thu, 19 Jan 2012 11:40:32 +0000 (22:40 +1100)]
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>
6 years agoOnly update pointer motion data for pointer emulated touch events
Chase Douglas [Thu, 19 Jan 2012 02:04:14 +0000 (18:04 -0800)]
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>
6 years agoOnly scale direct device touch coordinates
Chase Douglas [Thu, 19 Jan 2012 02:04:13 +0000 (18:04 -0800)]
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>
6 years agoinclude: Fix comment typo
Peter Hutterer [Mon, 16 Jan 2012 02:53:39 +0000 (12:53 +1000)]
include: Fix comment typo

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoconfigure.ac: Remove MIEXT_SHADOW_LIB from XORG_LIBS
Jeremy Huddleston [Mon, 9 Jan 2012 08:40:10 +0000 (00:40 -0800)]
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>
6 years agoxfree86: Don't link libxorgxkb against libdix.la
Jeremy Huddleston [Mon, 9 Jan 2012 08:14:29 +0000 (00:14 -0800)]
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>
6 years agosdksyms.sh: Exit on error rather than building an empty symbol table
Jeremy Huddleston [Fri, 13 Jan 2012 20:00:14 +0000 (12:00 -0800)]
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>
6 years agotest: Fix linking issues when building unit tests without the Xorg DDX
Jeremy Huddleston [Wed, 11 Jan 2012 20:17:06 +0000 (12:17 -0800)]
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>
6 years agoRevert "glx: don't leak fbconfigs"
Jeremy Huddleston [Sun, 15 Jan 2012 10:26:43 +0000 (02:26 -0800)]
Revert "glx: don't leak fbconfigs"

This reverts commit d26fae246d7c451b4d5ffe24fdb959d4bd00b107.

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>
6 years agoUse event time instead of CurrentTime for grab times
Chase Douglas [Wed, 11 Jan 2012 15:38:12 +0000 (07:38 -0800)]
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>
6 years agoxfree86: mention udev in the xorg.conf manpage AutoAddDevices section
Peter Hutterer [Thu, 12 Jan 2012 00:17:34 +0000 (10:17 +1000)]
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>
6 years agoos: prettify backtrace output
Peter Hutterer [Tue, 10 Jan 2012 23:04:02 +0000 (09:04 +1000)]
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>
6 years agoinclude: prettify BUG_WARN output
Peter Hutterer [Tue, 10 Jan 2012 23:01:05 +0000 (09:01 +1000)]
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>
6 years agorender: don't bother with animated cursors on floating slaves (#39989)
Peter Hutterer [Fri, 6 Jan 2012 03:20:45 +0000 (13:20 +1000)]
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>
6 years agodix: Update pointer limits for floating devices too (#43635)
Peter Hutterer [Mon, 9 Jan 2012 05:04:10 +0000 (15:04 +1000)]
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>
6 years agoRevert "os: Repack ConnectionOutput for LP64"
Keith Packard [Thu, 12 Jan 2012 20:10:07 +0000 (12:10 -0800)]
Revert "os: Repack ConnectionOutput for LP64"

This reverts commit d5f724544afd2949cebfcf4f0b4510ec0c701bec.

ABI change pended for 1.13

6 years agoRevert "dix: Repack ClientRec"
Keith Packard [Thu, 12 Jan 2012 20:10:03 +0000 (12:10 -0800)]
Revert "dix: Repack ClientRec"

This reverts commit f702372822dadb1fef92cfc25086481f640147b3.

ABI change pended for 1.13

6 years agoRevert "dix: Pull client-is-local flag up to the ClientRec"
Keith Packard [Thu, 12 Jan 2012 20:09:59 +0000 (12:09 -0800)]
Revert "dix: Pull client-is-local flag up to the ClientRec"

This reverts commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96.

ABI change pended for 1.13

6 years agoRevert "dix: Extend initial connection handshake for forwarding proxies"
Keith Packard [Thu, 12 Jan 2012 20:09:55 +0000 (12:09 -0800)]
Revert "dix: Extend initial connection handshake for forwarding proxies"

This reverts commit 78fa121f4097d29458e5453c13473595df06e26e.

ABI change pended for 1.13

6 years agoRevert "os: Hide the Connection{In,Out}put implementation details"
Keith Packard [Thu, 12 Jan 2012 20:09:44 +0000 (12:09 -0800)]
Revert "os: Hide the Connection{In,Out}put implementation details"

This reverts commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b.

ABI change pended for 1.13

6 years agoRevert "dix: Fix types in WindowOptRec"
Keith Packard [Thu, 12 Jan 2012 20:09:34 +0000 (12:09 -0800)]
Revert "dix: Fix types in WindowOptRec"

This reverts commit a4553019a10b4e01cc06f3081db71a83338697b4.

ABI change pended for 1.13

6 years agoMerge remote-tracking branch 'jturney/rpavlik-xwin-fixes'
Keith Packard [Mon, 9 Jan 2012 21:22:28 +0000 (13:22 -0800)]
Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes'

6 years agoMerge remote-tracking branch 'whot/multitouch'
Keith Packard [Mon, 9 Jan 2012 21:17:37 +0000 (13:17 -0800)]
Merge remote-tracking branch 'whot/multitouch'

6 years agomi/mibitblt: Fix an overflow bug of bit shift.
Zhigang Gong [Wed, 4 Jan 2012 07:01:19 +0000 (07:01 +0000)]
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>
6 years agoAdd OpenBSD support to DetermineClientCmd()
Matthieu Herrb [Mon, 2 Jan 2012 13:23:59 +0000 (13:23 +0000)]
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>
6 years agoAlways install xaa sdk headers
Adam Jackson [Tue, 3 Jan 2012 06:22:24 +0000 (06:22 +0000)]
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>
6 years agoUnloadSubModule(): accept pointer value '1' and ignore it.
Matthieu Herrb [Mon, 2 Jan 2012 13:11:41 +0000 (13:11 +0000)]
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>
6 years agovgahw: Fix DACDelay() macro to use the driver's vtable
Adam Jackson [Wed, 4 Jan 2012 16:39:33 +0000 (16:39 +0000)]
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>
6 years agoRevert "dix: don't return BadMatch from GetProperty (#23562)"
Chris Halse Rogers [Thu, 5 Jan 2012 01:22:40 +0000 (01:22 +0000)]
Revert "dix: don't return BadMatch from GetProperty (#23562)"

This reverts commit f04fe06ae244b851b38be824b1a80f2f8a030591.

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>
6 years agodix: Return BadWindow rather than BadMatch from dixLookupWindow
Chris Halse Rogers [Thu, 5 Jan 2012 01:22:39 +0000 (01:22 +0000)]
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>
6 years agolinux: Use K_OFF VT KB mode over K_RAW if available.
Arthur Taylor [Fri, 6 Jan 2012 07:21:37 +0000 (07:21 +0000)]
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>
6 years agoMerge commit '777bf90abeac37087a3d0538b847742523d5acf2'
Keith Packard [Mon, 9 Jan 2012 21:07:25 +0000 (13:07 -0800)]
Merge commit '777bf90abeac37087a3d0538b847742523d5acf2'

6 years agoMerge remote-tracking branch 'whot/for-keith'
Keith Packard [Mon, 9 Jan 2012 19:40:23 +0000 (11:40 -0800)]
Merge remote-tracking branch 'whot/for-keith'

6 years agoMerge remote-tracking branch 'kibi/master'
Keith Packard [Mon, 9 Jan 2012 19:37:59 +0000 (11:37 -0800)]
Merge remote-tracking branch 'kibi/master'

6 years agoXQuartz: GL: Buildfix for recent GLX changes
Jeremy Huddleston [Wed, 21 Dec 2011 03:49:47 +0000 (19:49 -0800)]
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>
6 years agoxkb: Message actions suppress other key presses #28575
Andreas Wettstein [Wed, 30 Nov 2011 19:20:21 +0000 (20:20 +0100)]
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>
6 years agohw/xwin: Include manifest file in the dist tarball
Ryan Pavlik [Fri, 4 Nov 2011 19:29:01 +0000 (14:29 -0500)]
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>
6 years agohw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
Ryan Pavlik [Fri, 4 Nov 2011 18:17:50 +0000 (13:17 -0500)]
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>
6 years agohw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow()
Ryan Pavlik [Fri, 28 Oct 2011 14:56:19 +0000 (09:56 -0500)]
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>
6 years agohw/xwin: Fix possible null ptr deref in winMWExtWMRestackFrame()
Ryan Pavlik [Fri, 28 Oct 2011 14:56:11 +0000 (09:56 -0500)]
hw/xwin: Fix possible null ptr deref in winMWExtWMRestackFrame()

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>
6 years agohw/xwin: Fix possible null ptr deref in winActivateAppPrimaryDD()
Ryan Pavlik [Fri, 28 Oct 2011 14:52:34 +0000 (09:52 -0500)]
hw/xwin: Fix possible null ptr deref in winActivateAppPrimaryDD()

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>
6 years agohw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI()
Ryan Pavlik [Fri, 28 Oct 2011 14:49:00 +0000 (09:49 -0500)]
hw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI()

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>
6 years agohw/xwin: Clarify an if statement mixed with ifdef in winSetEngine()
Ryan Pavlik [Fri, 28 Oct 2011 14:46:56 +0000 (09:46 -0500)]
hw/xwin: Clarify an if statement mixed with ifdef in winSetEngine()

Use the same pattern as elsewhere so it's a bit clearer what we
are checking

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>
6 years agohw/xwin: Fix rrScreenSetSize function pointer mismatch
Ryan Pavlik [Thu, 27 Oct 2011 20:49:59 +0000 (15:49 -0500)]
hw/xwin: Fix rrScreenSetSize function pointer mismatch

winrandr.c: In function ‘winRandRInit’:
winrandr.c:218:31: warning: assignment from incompatible pointer type

Fix winRandRScreenSetSize() function signature to match RRScreenSetSizeProcPtr type,
to align with commit fd9331f6 'Revert "Separate out screen size and screen pixmap
sizes in RRScreenSizeSet"'

This is fall-out from the late revert of RANDR 1.4 in the 1.10 release cycle, it will
probably need to be reverted if/when that goes back in again.

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>
6 years agohw/xwin: Remove an empty #if 0/#endif
Ryan Pavlik [Fri, 28 Oct 2011 14:56:26 +0000 (09:56 -0500)]
hw/xwin: Remove an empty #if 0/#endif

Um... yeah

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>
6 years agohw/xwin: Fix double-free in error path in winQueryRGBBitsAndMasks()
Ryan Pavlik [Fri, 28 Oct 2011 14:52:37 +0000 (09:52 -0500)]
hw/xwin: Fix double-free in error path in winQueryRGBBitsAndMasks()

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>
6 years agohw/xwin: Fix a memory leak in error path in winInitWM()
Ryan Pavlik [Fri, 28 Oct 2011 14:46:45 +0000 (09:46 -0500)]
hw/xwin: Fix a memory leak in error path in winInitWM()

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>
6 years agoxfree86: Remove the pretense of EDID v2 support
Adam Jackson [Mon, 18 Jul 2011 19:07:07 +0000 (15:07 -0400)]
xfree86: Remove the pretense of EDID v2 support

We don't do anything with EDID v2 blocks besides publish them on the
root window.  Worse, the check deleted by this patch would attempt to
take a checksum of arbitrary memory if the rawData array isn't 256+
bytes long (and, for the monitors mentioned, it probably is only 128).

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agodix: Tune dixLookupDrawable for success
Adam Jackson [Wed, 14 Dec 2011 02:23:12 +0000 (21:23 -0500)]
dix: Tune dixLookupDrawable for success

The vast vast vast majority of resource lookups are successful.  Move some
work to the error paths so we don't punish success.

Before:
40000000 trep @   0.0009 msec (1109091.3/sec): PutImage 10x10 square
60000000 trep @   0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square

After:
40000000 trep @   0.0009 msec (1148346.9/sec): PutImage 10x10 square
60000000 trep @   0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agodix: Tune dtrace hooks around Dispatch
Adam Jackson [Wed, 14 Dec 2011 01:23:40 +0000 (20:23 -0500)]
dix: Tune dtrace hooks around Dispatch

Don't call LookupMajorName if the hooks aren't active, it's quite expensive.

Before:
40000000 trep @   0.0009 msec (1087458.5/sec): PutImage 10x10 square
60000000 trep @   0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square

After:
40000000 trep @   0.0009 msec (1109091.3/sec): PutImage 10x10 square
60000000 trep @   0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agoxace: ricer tuning for XaceHook
Adam Jackson [Wed, 14 Dec 2011 02:00:05 +0000 (21:00 -0500)]
xace: ricer tuning for XaceHook

gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the
varargs code for some reason, so do it ourselves.

Before:
40000000 trep @   0.0010 msec (1050420.2/sec): PutImage 10x10 square
60000000 trep @   0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square

After:
40000000 trep @   0.0009 msec (1087458.5/sec): PutImage 10x10 square
60000000 trep @   0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agodix: Fix types in WindowOptRec
Adam Jackson [Fri, 17 Jun 2011 18:30:06 +0000 (14:30 -0400)]
dix: Fix types in WindowOptRec

No reason for these to be 64 bits on LP64.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agoos: Minor header cleanup
Adam Jackson [Fri, 17 Jun 2011 18:17:09 +0000 (14:17 -0400)]
os: Minor header cleanup

Move some constants near their only users, and remove some
getdtablesize() logic that's second-guessing configure.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agoos: Hide the Connection{In,Out}put implementation details
Adam Jackson [Fri, 17 Jun 2011 18:03:01 +0000 (14:03 -0400)]
os: Hide the Connection{In,Out}put implementation details

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agodix: Extend initial connection handshake for forwarding proxies
Adam Jackson [Fri, 17 Jun 2011 17:43:38 +0000 (13:43 -0400)]
dix: Extend initial connection handshake for forwarding proxies

Forwarding proxies like sshd will appear to be local, even though they
aren't really.  This leads to weird behaviour for extensions that truly
require running under the same OS services as the client, like MIT-SHM
and DRI2.

Add two new legal values for the initial connection's byteOrder field,
'r' and 'R'.  These act like 'l' and 'B' respectively, but have the side
effect of forcing the client to be treated as non-local.  Forwarding
proxies should attempt to munge the first packet of the connection
accordingly; older servers will reject connections thusly munged, so the
proxy should fall back to passthrough if the munged connection attempt
fails.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agodix: Pull client-is-local flag up to the ClientRec
Adam Jackson [Fri, 17 Jun 2011 17:22:41 +0000 (13:22 -0400)]
dix: Pull client-is-local flag up to the ClientRec

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agodix: Repack ClientRec
Adam Jackson [Fri, 17 Jun 2011 16:58:25 +0000 (12:58 -0400)]
dix: Repack ClientRec

sizeof(ClientRec)   ILP32   LP64
before                120    184
after                 104    136

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agoos: Repack ConnectionOutput for LP64
Adam Jackson [Thu, 16 Jun 2011 21:40:24 +0000 (17:40 -0400)]
os: Repack ConnectionOutput for LP64

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
6 years agoXi: change XIChangeDeviceProperty from const pointer to const void *
Peter Hutterer [Fri, 6 Jan 2012 00:10:16 +0000 (10:10 +1000)]
Xi: change XIChangeDeviceProperty from const pointer to const void *

According to Daniel Kurtz, a typedef void *pointer is a atomic type. So a
'const pointer' is equivalent to 'void* const' instead of the intended
'const void*'.

This technically changes the ABI, but we don't bump it for this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
6 years agoRemove last listener on touch reject
Chase Douglas [Fri, 6 Jan 2012 00:43:40 +0000 (16:43 -0800)]
Remove last listener on touch reject

The current code short-circuits around the block that removes the
rejecting listener if it is the only listener left. It also does not
delete the touchpoint record if the touch has not physically ended.

This change ensures the listener is removed under these circumstances.

Signed-off-by: Chase Douglas <chase.douglas@ubuntu.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoDon't end touchpoint if owning client hasn't accepted/rejected
Chase Douglas [Wed, 4 Jan 2012 23:50:40 +0000 (15:50 -0800)]
Don't end touchpoint if owning client hasn't accepted/rejected

A touchpoint is ended when no further processing will take place for it.
This includes the situation where there is only one grabbing client, and
the client receives a touch end before it has accepted/rejected the
touchpoint.

This change ensures that a delivered touch end event is converted into a
touch update event under the above scenario. If the event is left as a
touch end event, the touchpoint will be ended in ProcessTouchEvent().

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>