Age | Commit message (Collapse) | Author |
|
|
|
_XiGetExtensionVersion was called from XGetExtensionVersion and from
_XiCheckExtInit. When called from _XiCheckExtInit, nothing accounted for the
fact that it can return ((XExtensionVersion *) NoSuchExtension) in case of
error. Also it recursively calls _XiCheckExtInit potentionally causing multiple
unlocks if _XiCheckExtInit fails.
-> Remove it and call directly _XiGetExtensionVersionRequest and only call
_XiCheckExtInit only from XGetExtensionVersion.
Signed-off-by: Michal Srb <msrb@suse.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
_XEatDataWords was orignally introduced with the May 2013 security
patches, and in order to ease the process of delivering those,
fallback versions of _XEatDataWords were included in the X extension
library patches so they could be applied to older versions that didn't
have libX11 1.6 yet. Now that we're past that hurdle, we can drop
the fallbacks and just require libX11 1.6 for building new versions
of the extension libraries.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
No functional changes, this simply introduces a version helper function that
returns -1, 0 or 1 depending on the version comparison result. To be used
internally only.
Needed for fix to #34240
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Adds support for the new TouchClass for multitouch-capable servers/devices.
New events:
XITouchOwnershipEvent
New event types handled:
XITouchBegin, XITouchUpdate, XITouchEnd
XIRawTouchBegin, XIRawTouchUpdate, XIRawTouchEnd
New functions:
XIGrabTouchBegin ... passive grabs on touches
XIUngrabTouchBegin
XIAllowTouchEvents ... Allow/reject touch event sequences
New XIQueryDevice classes:
XITouchClassInfo
Requires libX11 1.5 for GetReqSized
Co-authored by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Add the required constants to pretend to support XI 2.1.
Having named constants for 2.1 seems a bit pointless, so let's just use the
numbers directly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
These defines are currently defined in XI.h and XI2.h. Their only use is as
offset into a library-internal array. Add them to XIint.h to have them where
they belong.
These defines do not have any effect on the protocol. They are simply
offsets into an array for libXi-specific version checking. The defines are
added to this header for readability, given that we cannot remove them from
the protocol without potentially breaking clients (who should never use
these anyway, but...) means they will never get hit.
Future defines for these offsets will only be added to libXi, not the
protocol.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
If the server supports a lower XI version than the client, the Xlib-internal
event vector may be smashed. See libXext for more details.
http://cgit.freedesktop.org/xorg/lib/libXext/commit/?id=83fdb27df4ddc2fb088ddf2ec65f0db6b7c57287
This patch queries the server for the supported XI extension before
registering the extension with Xlib. The number of events registered depends
on the server version.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
Simple call to get the pointer to the next field when operating on a wire
protocol struct or on a single-memory-block Xlib structure.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
XIQueryVersion (like all other calls) makes sure XGetExtensionVersion is
called beforehand anyway. So if that doesn't match 2.0 or higher, return
BadRquest before issuing the real request (which would trigger a BadRequest
error). This way, clients can use XIQueryVersion without having to set up
the error handler.
XIQueryVersion is now guaranteed to return the server-supported version.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This fixes 64bit compilation issues.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
FIXME: not bisectable due to XiSelectInput.
This includes namespacing them with an XI2 prefix.
Affected calls:
XIGetClientPointer
XISetClientPointer
XIDefineDeviceCursor
XIUndefineDeviceCursor
XIWarpDevicePointer
XIQueryDevicePointer
XIChangeDeviceHierarchy (+ event)
|
|
|
|
XI2 should use a separate request to query the version rather than piggy-back
on an existing badly defined request.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
Thre are still two remaining compiler warnings, because of non matching
function prototypes and function pointer arguments prototypes:
src/XSndExEv.c:XSendExtensionEvent()
variable register Status(**fp) (Display *, XEvent*, xEvent **, int *)
doesn't match struct _XDisplay's:
Status (*wire_vec[128])( /* vector for event to wire */
Display * /* dpy */,
XEvent * /* re */,
xEvent * /* event */
);
and
src/XExtInt.c:xinput_extension_hooks field event_to_wire of type
XExtensionHooks that has the prototype Status (*event_to_wire)(
Display* /* display */,
XEvent* /* re */,
xEvent* /* event */
);
does not match Status
_XiEventToWire(
register Display *dpy, /* pointer to display structure */
register XEvent *re, /* pointer to client event */
register xEvent **event, /* wire protocol event */
register int *count);
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
|
|
We need XI to be able to do some sort of versioning support.
|
|
held.
All callers of _XiCheckExtInit have already called XInput_find_display
first outside the lock, so just pass their copy of the XExtDisplayInfo
structure down. Besides being more correct, this should be slightly
faster. :-)
Thanks to Magnus Kessler <Magnus.Kessler@gmx.net> for identifying
the bug and proposing a workaround.
|
|
lock is held.
_XiGetExtensionVersion has two callers. One had already called
XInput_find_display, and the other could easily do so outside the
Display lock. So I change the _XiGetExtensionVersion interface to
accept a previously-computed XExtDisplayInfo from the caller.
Besides being more correct, this should be slightly faster. :-)
Thanks to Magnus Kessler <Magnus.Kessler@gmx.net> for identifying
the bug and proposing a workaround.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|