Commit Graph

1049 Commits

Author SHA1 Message Date
Peter Hutterer ffd4874798 include: add version_compare helper function
Compare two version numbers in the major.minor form.
Switch the few users of manual version switching over to the new function.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-05-13 09:41:50 +10:00
Peter Hutterer 5bcc22757e dix: return deliveries from DeliverGrabbedEvent
This isn't currently used by any of the callers but it will likely be in the
future.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-05-13 09:41:37 +10:00
Peter Hutterer 20fb07f436 input: remove DDX event list handling
The current approach to event posting required the DDX to request the event
list (allocated by the DIX) and then pass that list into QueuePointerEvent
and friends.

Remove this step and use the DIX event list directly. This means that
QueuePointerEvent is not reentrant but it wasn't before anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:36 +10:00
Peter Hutterer 8670c46bdf input: replace EventListPtr with InternalEvent array
EventListPtr is a relic from pre-1.6, when we had protocol events in the
event queue and thus events of varying size.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:36 +10:00
Peter Hutterer e7150db535 input: Provide Queue{Button|Keyboard|Proximity}Event helpers
Don't require every caller to use GPE + mieqEnqueue, provide matching
Queue...Event functions instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:33 +10:00
Daniel Stone 00ba884556 Input: Make CheckPassiveGrabsOnWindow take InternalEvent
Previously, it only took DeviceEvents, but it would be much more useful
if it took InternalEvents.  Any event that activates a grab must still
be a DeviceEvent, so put in a check to enforce this.

Change all callers to make the appropriate casts.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-06 13:15:16 +10:00
Peter Hutterer 5690199802 input: change CHECKEVENT macro to verify_internal_event function
The macro is sufficient if called during a development cycle, but not
sufficient information when triggered by a user (e.g.
https://bugzilla.redhat.com/show_bug.cgi?id=688693).

Expand what this does to print the event content and a backtrace, so at
least we know where we're coming from. Only the first 32 bytes are printed
since if something goes wrong, the event we have is almost certainly an
xEvent or xError, both restricted to 32 bytes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-05-06 09:58:08 +10:00
Peter Hutterer bf2059b07a input: Only release SD buttons for explicit floating/reattachment (#36146)
Grabbing an SD device temporary floats the device but we must not release
the buttons. Introduced in

    commit 9d23459415
    Author: Peter Hutterer <peter.hutterer@who-t.net>
    Date:   Fri Feb 25 11:08:19 2011 +1000

    dix: release all buttons and keys before reattaching a device (#34182)

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-05 10:29:17 +10:00
Daniel Stone 7063264910 Input: Add DeepestSpriteWin function
Does what it says on the box: returns the deepest child window in a
given sprite's trace.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2011-05-03 01:46:35 +01:00
Keith Packard ec9ea40178 Merge remote-tracking branch 'jeremyhu/master' 2011-04-27 12:01:56 -07:00
Jeremy Huddleston de4023f194 XQuartz: Rename launchd-id-prefix to bundle-id-prefix
It's used many other places than just for launchd.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston e466745109 XQuartz: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston bb4d145bd2 glx: Silence warnings when building with clang
This replaces AX_TLS (GPL3) with XORG_TLS (MIT)

In file included from glapi.c:46:
In file included from ./glapi.h:51:
./glthread.h:237:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
    __attribute__((tls_model("initial-exec")));
                   ^
In file included from glapi.c:46:
./glapi.h:92:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
    __attribute__((tls_model("initial-exec")));
                   ^
glapi.c:82:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
    __attribute__((tls_model("initial-exec"))) = NULL;
                   ^
glapi.c:85:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
    __attribute__((tls_model("initial-exec")));
                   ^
4 errors generated.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-04-25 18:56:56 -07:00
Jeremy Huddleston aad7b324ae os: Add missing _X_ATTRIBUTE_PRINTF to va_list variants
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 10:45:34 -07:00
Søren Sandmann Pedersen 61a92a78cd Add RegionInitBoxes(), and fix some buggy callers of RegionInit().
The interface to RegionInit():

    RegionInit (RegionPtr pReg, BoxPtr rect, int size);

is very confusing because it doesn't take a list of boxes, it takes
*one* box, but if that box is NULL, it initializes an empty region
with 'size' rectangles preallocated.

Most callers of this function were correctly passing either NULL or
just one box, but there were three confused cases, where the code
seems to expect a region to be created from a list of boxes.

This patch adds a new function RegionInitBoxes() and fixes those
instances to call that instead.

And yes, the pixman function to initialize a region from a list of
boxes is called init_rects() because pixman is also awesome.

V2: Make RegionInitBoxes() return a Bool indicating whether the call
    succeeded, and fix the callers to check this return value.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Søren Sandmann <ssp@redhat.com>
2011-04-22 21:39:31 -04:00
Keith Packard 918a9c99cf Merge remote-tracking branch 'jeremyhu/master' 2011-04-22 11:20:16 -07:00
Jeremy Huddleston ca7b9e6c81 configure.ac: Add check for libdispatch when building for darwin
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-21 23:56:18 -07:00
Peter Hutterer 1c162ebcab dix: change ProcessVelocityData2D to BOOL.
Don't confuse users with a return type of short, that's even less indicative
that it returns 0/non-0 than "int".

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-04-21 14:17:55 +10:00
Peter Hutterer 071a6ac4d0 input: remove GetKeyboardValuatorEvents, this is now unnecessary.
GetKeyboardValuatorEvents handles NULL valuator masks already, so the
GetKeyboardEvents wrapper is not needed. Rename GKVE to GKE.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-18 13:05:46 +10:00
Peter Hutterer 419a27b521 Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119)
commit 678f5396c9 only fixed the
initialization, not the copy. After a slave device change, the valuator
were out of alignment again.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 13:04:19 +10:00
Keith Packard a095a6d4e8 Merge remote-tracking branch 'airlied/pwin-cleanup' 2011-03-27 20:06:29 -07:00
Keith Packard a22486f848 Merge remote-tracking branch 'whot/for-keith' 2011-03-27 18:27:10 -07:00
Dave Airlie eb9266c717 consolidate SetRootClip (v2)
each DDX has its own copy, I've taken the darwin one,
though I'm not sure why it needs the pOldClip piece that nobody
else has and the commit msg is like an "Updates from magic land"
type message.

This removes the main uses of pWin->winSize from the DDXen.

v2: drop old clip like ajax suggests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-03-28 10:06:32 +10:00
Simon Thum 633b81e8ba xserver: remove AbsoluteClassRec keeping the ABI
This removes the struct, but keeps InitAbsoluteClassDeviceStruct as
a no-op and preserves related struct layout.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-24 09:52:51 +10:00
Jeremy Huddleston c55baebf4e GLX: Support TLS with better portability
AX_TLS detects when toolchains support __thread or __declspec(thread),
but existing code assumed __thread.

This also adds a check to configure.ac to error out if TLS is requested
but unsupported.

Found-by: Tinderbox
http://tinderbox.x.org/builds/2011-03-22-0007

Regression-from: 82b1eaa6ca

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Tom Fogal <tfogal@alumni.unh.edu>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-03-23 09:11:33 -07:00
Keith Packard d5b16b037b Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class"
This reverts commit 1564c82417.

The drivers used the top bits of the usage_hint to store driver
private flags (intel, radeon, nouveau).

With EXA we need to get at this data so if we migrate the pixmap we
can create the correct type of pixmap in the driver, however this
commit truncates the usage_hint into 8-bit class and loses all the
good stuff.

Signed-off-by: Dave Airlie <airlied@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2011-03-17 23:48:52 -07:00
Rami Ylimäki 5c47f8beac xkb: Release XKB component names when compiling keymap.
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-16 15:21:41 +10:00
Keith Packard 0ac4931753 Merge remote-tracking branch 'ajax/xserver-next' 2011-03-14 13:06:41 -07:00
Adam Jackson 016edc1751 dix: Define RESTYPE as uint32_t
long is needlessly long on LP64.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-14 13:57:20 -04:00
Adam Jackson 1f2bc777f9 dix: Shrink PropertyRec on LP64
size needn't be a long.  No change on ILP32 but, combined with the
previous change, 56 -> 40 bytes on LP64.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-14 13:44:46 -04:00
Adam Jackson 51f353d0a0 dix: Fix ATOM typedef
unsigned long is needlessly large on LP64.  Use uint32_t instead.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-14 13:44:07 -04:00
Christopher James Halse Rogers d17a9fb841 Consolidate all the PATH_MAX handling into misc.h
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
2011-03-14 13:42:55 -04:00
Keith Packard c3c0e2fdd3 Merge remote branch 'whot/for-keith' 2011-03-09 14:25:54 -08:00
Adam Jackson fddfd026a0 dix: Remove PIXEL typedef
Doesn't appear to be used anywhere.

Reviewed-by: Soren Sandmann <ssp@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-08 13:19:00 -05:00
Adam Jackson 82a8677d91 dix: Remove deprecated.c
No more internal users, this can be dropped now.

Reviewed-by: Soren Sandmann <ssp@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-08 13:17:24 -05:00
Adam Jackson 1564c82417 dix: Remove usage_hint from pixmaps, store it in ->drawable.class
The class field was unused for pixmaps, and we don't have enough classes
to justify a whole uint32 anyway.

Reviewed-by: Soren Sandmann <ssp@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-08 13:16:50 -05:00
Keith Packard 6c90e839d9 Merge remote branch 'whot/for-keith' 2011-03-03 14:41:44 -08:00
Keith Packard 3f41f4adea Merge remote branch 'sandmann/for-keithp' 2011-03-03 14:12:36 -08:00
Keith Packard 8e4c3ce55b Merge remote branch 'rjy/clientids' 2011-03-03 13:42:07 -08:00
Simon Thum 1c008e7e78 dix: change all timestamps in pointer acceleration to CARD32
CARD32 is being returned by GetTimeInMilis(), so use it consistently.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-02 15:00:08 +10:00
Simon Thum a4b8526185 dix: update pointer acceleration code to use ValuatorMask
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-02 14:54:03 +10:00
Simon Thum 8128846e16 dix: refactor predictable scheme initialization
This intends to clean up the predictable accel struct
from purely scheme-related things like input properties,
as they would be useless in other use cases such
as wheel acceleration.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-02 14:47:58 +10:00
Søren Sandmann Pedersen dae24abcd4 Delete RegionClipSpans()
Nothing uses it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Søren Sandmann Pedersen <ssp@redhat.com>
2011-03-01 07:58:06 -05:00
Adam Jackson edcceedbd3 xext: Remove XCALIBRATE extension
Nobody can have been using this, it's never called from extension init.
XI2 device properties should now be a functional replacement.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-01 10:56:17 +10:00
Peter Hutterer c2207d11f2 Merge branch 'next' into for-keith
Conflicts:
	dix/devices.c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-28 11:26:09 +10:00
Keith Packard 365ad68fb9 Merge remote branch 'ajax/for-keithp' 2011-02-24 18:49:40 -08:00
Peter Hutterer 816f1f8ffa include: document list interface.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-25 09:03:08 +10:00
Keith Packard 9f47780ecd Revert "randr: Hook up the new RandR 1.4 functionality"
This reverts commit afb6ebf1d5.
2011-02-23 11:17:36 -08:00
Peter Hutterer 720c895db9 Add mode field to ConstrainCursorHarder
For Pointer Barriers, the movement mode is important and must be passed
through.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-23 13:39:22 -05:00
Adam Jackson a16e282200 xfree86: Fix the sdk headers to be multilib-safe
Use _LP64 (verified on gcc and sun compilers) instead of _XSERVER64 in
internal header usage, and always define _XSERVER64 for modules if _LP64
is defined.  Prevents differing xorg-server.h between 32 and 64 bit
packages.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-23 13:39:22 -05:00