Age | Commit message (Collapse) | Author | Files | Lines |
|
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:
-bap
-psl
-T PrivatePtr
-T pmWait
-T _XFUNCPROTOBEGIN
-T _XFUNCPROTOEND
-T _X_EXPORT
The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.
The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.
The comparison was done with this script:
dir1=$1
dir2=$2
for dir in $dir1 $dir2; do
(cd $dir && find . -name '*.o' | while read file; do
dir=`dirname $file`
base=`basename $file .o`
dump=$dir/$base.dump
objdump -d $file > $dump
done)
done
find $dir1 -name '*.dump' | while read dump; do
otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
diff -u $dump $otherdump
done
Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
pointer events
The internal flag is kept around, merely translated to XITouchEmulatingPointer
when creating the XI2 events that will be delivered to the client.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This patch applies most of the protocol conversions and the internal event
type for ownership events.
Note that ownership events are generated by the DIX only, they do not pass
through the event queue.
Co-authored-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
No-one can generated them yet, but if they could, we'd be processing them
like there was no tomorrow.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
The are the same as device events internally but require the touch ID
separately from the detail.button field (the protocol uses the detail field
for the touch id).
For simpler integration of pointer emulation we need to set the
detail.button field while keeping the touchid around.
Add the three new touch event types to the various places in the server
where they need to be handled. The actual handling of the events is somewhat
more complicated in most places.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Avoids the dummy-event dance if we have an event type and need to get the
matching XI2 type.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
3304bbff9b4ed63f1a47410a5320a136420ba2c6 added smooth scrolling support for
pointer events and for XIQueryDevice but didn't add the matching parts to
XIDeviceChangedEvents.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
X.Org Bug 34240 <http://bugs.freedesktop.org/show_bug.cgi?id=34240>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
(1UL << 32) evaluates to 0 (at least here), so do the
fraction calculation in two steps as in libXi. Fractions on xXIRawEvent
were not multiplied at all, which also gave 0 as result.
Signed-off-by: Max Schwarz <Max@x-quadraht.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Change the DeviceEvent InternalEvent to use doubles for its valuators,
instead of data and data_frac.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Change RawDeviceEvent to use doubles for valuators internally, rather
than data(_raw) and data(_raw)_frac.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Add a flags member which will be copied wholesale into the resultant
xXIRawEvent.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
Add a flags member which will be copied wholesale into the resultant
xXIDeviceEvent.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-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>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Set the valuator values for unset masked absolute valuators in the
internal device event. This ensures the values will always be correct in
getValuatorEvents even if the device has been removed.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Relative valuator values should not be reported in any future events. If
a relative valuator value is not set in an internal event, set the value
to 0 for XI 1.x valuator events sent over the wire.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-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>
|
|
This allows for masked valuators to be handled properly in XI 1.x
events. Any unset valuators in the device event are set to the last
known value when transmitted on the wire through XI 1.x valuator events.
Fixes https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/736500
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>
|
|
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
eventconvert.c:287:9: warning: enumeration value 'ET_Enter' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_Leave' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_FocusIn' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_FocusOut' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_DeviceChanged' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_Hierarchy' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_DGAEvent' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_RawKeyPress' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_RawKeyRelease' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_RawButtonPress' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_RawButtonRelease' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_RawMotion' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_XQuartz' not handled in switch
eventconvert.c:287:9: warning: enumeration value 'ET_Internal' not handled in switch
From the code it appears these are can't happens, so if they ever do,
BadImplementation seems entirely appropriate.
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>
|
|
|
|
For all but motion and proximity events, having no valuators is ok.
Regression from 1.9, keyboard events are not converted to protocol events.
X.Org Bug 34510 <http://bugs.freedesktop.org/show_bug.cgi?id=34510>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Timo Aaltonen <timo.aaltonen@canonical.com>
|
|
Some event types (notably Expose and GraphicsExpose) require multiple
events, a la XI 1.x. Bring the EventToCore API in line with EventToXI's
and allow it to generate multiple events.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
XI 1.x events still contain absolute coordinates anyway. By the time we get
to the InternalEvent to XI event conversion, the valuators are already
absolute.
Stopping because of a different mode on a valuator is not necessary.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Don't stop processing events when a valuator's mode doesn't match the 0th
valuator's mode. Instead, start with the first_valuator in the event and
keep stacking them on until the first valuator with a different mode is hit.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
The DeviceEvent's mode field is a set of bits for each valuator, not bytes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
The XI2 protocol supports per-axis modes, but the server so far does
not. This change adds support in the server.
A complication is the fact that XI1 does not support per-axis modes.
The solution provided here is to set a per-device mode that defines the
mode of at least the first two valuators (X and Y). Note that initializing
the first two axes to a different mode than the device mode will fail.
For XI1 events, any axes following the first two that have the same mode
will be sent to clients, up to the first axis that has a different mode.
Thus, if a device has relative, then absolute, then relative mode axes,
only the first block of relative axes will be sent over XI1.
Since the XI2 protocol supports per-axis modes, all axes are sent to the
client.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Devices that send motion events with valuators other than x/y get core
motion events with unchanged x/y coordinates. This confuses some
applications.
If the DeviceEvent does not have the x/y valuators set, return BadMatch on
core conversion, thus skipping the event altogether.
Reported-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
|
|
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.
X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This value isn't actually set for normal events but it saves us some work
for the record extension support.
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>
|
|
This reverts commit 0f2d297dedeff8bd227df4c498cc668b0e902344.
Peter provided an updated patch which fixes the tests.
|
|
This value isn't actually set for normal events but it saves us some work
for the record extension support.
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>
|
|
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
To avoid confusion, the member names are now postfixed with _event.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Just in case we figure out a better way to do it in the future.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
For core and XI1 events, store the key_repeat flag in the sequence number
until TryClientEvents. The sequenceNumber is unset until TryClientEvents.
[Also thrown in, some random indentation changes. Thanks]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
DCEs are now processed when sent throught the master device, not when sent
through the slave device. This includes a removal of some un-used (or partly
used) fields in the DCE itself to something more self-explanatory.
TODO: if a device has events queued and its attachment is changed, the DCE
is silently dropped now. Instead, it should be generated as soon as the
first event after the attachment is sent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Doesn't matter really, they have the same values anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The version in eventconvert.c was half broken and for some reason we ended
up with a second version in exevents.c (which works). Move it over to where
it belongs and call EventToXI2 instad of having a custom function for it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
DeviceClassesChangedEvents (where this name comes from) have been replaced
with DeviceChangedEvents.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Use enum EventType instead of ints. This requires a load of default
cases in various switch statements to silence compiler warnings.
Reported-by: Aaron Plattner
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
InternalEvents shouldn't be used anywhere outside the X server itself. Split
up into events.h for opaque typedefs for the events needed by various
headers and eventstr.h for the actual struct definitions.
eventstr.h must only be included by code that requires internal events and
is not part of the SDK.
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Require inputproto 1.9.99.13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Some files (notably those merged with MPX before XI2 came along) didn't use
a 'xi' prefix. This patch changes all of them to meaningful names.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Valuator events need to include the device's state, while other device
events need to include the state of the core devices.
Reported-by: Thomas Jaeger
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|