Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
There is really no real reason why this should be necessary, but wine
developers are stuborn, so doing this to try to work around this wine
issue:
http://bugs.winehq.org/show_bug.cgi?id=29732
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
|
|
Previously, we only had one idle alarm that was triggered for all devices,
whenever the user used any device, came back from suspend, etc.
Add system SyncCounters for each device (named "DEVICEIDLETIME x", with x
being the device id) that trigger on that device only. This allows for
enabling/disabling devices based on interaction with other devices.
Popular use-case: disable the touchpad when the keyboard just above the
touchpad stops being idle.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
Preparation work for per-device idle counters.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
Required for future dynamic names.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
And drop the three global variables, we have a reference to the counter
everywhere now.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
No functional changes, currently unused. Preparation work, we don't need a
global variable if we can pass the counters around anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
Will be used to store counter-specific data.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
Cleanup for future features, no functional changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
Instead of referring to the global IdleTimeCounter everywhere, only do it
once and use a local variable for the rest.
Cleanup for future features, no functional changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
Signed-off-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>
|
|
|
|
For driver debugging, it is helpful to know whether the driver has actually
submitted an event to the server. dtrace hooks can help here.
Note that GetPointerEvents and friends may also be triggered by the server
for other emulated devices, some care must be taken when analysing the
results.
Additional difficulty: proximity events have a run-time assigned type, so
this may make automatic detection a tad harder. If in doubt, go for any
event > 64 since the only two that can have that value are ProximityIn and
ProximityOut.
An example systemtap script is below:
# Compile+run with
# stap -g xorg.stp /usr/bin/Xorg
#
function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{
int i;
unsigned char *mask = (unsigned char*)THIS->mask_in;
double *valuators = (double*)THIS->valuators_in;
char str[128] = {0};
char *s = str;
#define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] & (1 << ((bit) & 7)))
s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators);
for (i = 0; i < THIS->nvaluators; i++)
{
s += sprintf(s, " %d: ", i);
if (BitIsSet(mask, i))
s += sprintf(s, "%d", (int)valuators[i]);
}
sprintf(THIS->__retvalue, "%s", str);
%}
probe process(@1).mark("input__event")
{
deviceid = $arg1
type = $arg2
detail = $arg3
flags = $arg4
nvaluators = $arg5
str = print_valuators(nvaluators, $arg6, $arg7)
printf("Event: device %d type %d detail %d flags %#x %s\n",
deviceid, type, detail, flags, str);
}
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
type safety++
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Bryce Harrington <bryce@canonical.com>
|
|
Regression introduced in 4e52cc0ef48145134cd58d357fb7289e6f8bb709
Raw event values are values as-is from the driver, modified only be
transformation or acceleration. 4e52cc caused the mask to be updated from
relative to absolute coordinates which then got written into the raw events.
Move the raw event update into the respective branches for absolute/relative
events.
X.Org Bug 46976 <http://bugs.freedesktop.org/show_bug.cgi?id=46976>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Sven Arvidsson <sa@whiz.se>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Bryce Harrington <bryce@canonical.com>
|
|
getevents.c: In function 'updateSlaveDeviceCoords':
getevents.c:326:15: warning: unused variable 'scr' [-Wunused-variable]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
No functional changes, just for readability
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Bryce Harrington <bryce@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
|
|
Not implemented anywhere.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Bryce Harrington <bryce@canonical.com>
|
|
ended
All touches of an indirect device, such as a trackpad, are sent to the
same window set. When there are no active touches, a new window set is
created; otherwise, the window set of an existing touch is copied.
The current code checks for any logically active touches. This includes
touches that have physically ended but are still logically active due to
unhandled touch grabs. Instead, we want a new window set whenever there
are no physically active touches.
This change skips over logically active but pending end touches, which
are touches that have physically ended.
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>
|
|
If there is only one listener of a touch, the listener is a grab, and is
accepted before the touch has ended, the current code will not end the
touch record when the touch does end.
This change adds a listener state for when a touch is accepted but has
not yet ended. We now keep the touch record alive in this state, but end
it when the touch ends.
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>
|
|
No idea what this was referring to but it goes past git history.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
There are a few subtle bugs during startup where IsFloating() returns true
if the device is a master device that is not yet paired with its keyboard
device.
Force IsFloating() to always return FALSE for master devices, that was the
intent after all and any code that relies on the other behaviour should be
fixed instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Return BadValue if major or minor differs on the second call.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
master->last.valuators[] is in desktop dimensions, so use those as
rescale axis ranges, not the screen. Otherwise, a rescale on any screen
not the top-left will cause out-of-bounds coordinates which will always
map to the bottom-right screen, causing the device to be stuck on that
screen.
X.Org Bug 46657 <http://bugs.freedesktop.org/show_bug.cgi?id=46657>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
PickPointer or PickKeyboard return NULL, all MDs are currently disabled and
we cannot emulate a core event. This wasn't anticipated by the protocol, so
we don't really have an error code we may use here - BadAccess is simply the
least bad of the possible ones.
And returning BadAccess beats crashing the server.
X.Org Bug 45796 <http://bugs.freedesktop.org/show_bug.cgi?id=45796>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
When redirect actions are used with Gtk3, Gtk3 complained about
events not holding a GdkDevice. This was caused by device IDs
not being set for redirect actions.
More seriously, Gtk3 did not receive state changes redirect
actions might specify. This was because event_set_state in
dix/inpututils.c accesses the prev_state field, but the changes
for the redirect action were only put into the state field.
Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If the typedef wasn't perfect, indent would get confused and change:
foo = (SomePointlessTypedef *) &stuff[1];
to:
foo = (SomePointlessTypedef *) & stuff[1];
Fix this up with a really naïve sed script, plus some hand-editing to
change some false positives in XKB back.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
Comments inside of conditionals confuse indent to death. Which is fair
enough really.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
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>
|
|
indent sometimes adds a blank line between the type and the name in a
function declaration that includes _X_EXPORT, so handle that before
the files are re-indented.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Now that 1.12 has branched, reset the version on master to a
development number.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
And for such devices simply take the last.valuators[] which must be valid at
all times anyway. UpdateSlaveDeviceCoords takes care of that.
X.Org Bug 38313 <http://bugs.freedesktop.org/show_bug.cgi?id=38313>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
This reverts commit 2bfb802839688ecf328119c4c6979390fc60348d.
This commit caused a regression.
See: http://xquartz.macosforge.org/trac/ticket/517#comment:10
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This also avoids a deadlock when calling activateX: before the server
thread has initialized
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
|
|
The VCP may have active touch grabs. The touch records must be kept so
these touch grabs may be accepted/rejected in the future. This means the
touch class list will not represent the touch class of the attached
slave device if it does not have a touch class, but we already were
breaking that assumption by keeping a separate touches array for the
VCP.
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>
|
|
The VCP has its own touches array, don't overwrite it when the class is
copied from the SD to the master.
Reported-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
In this case, we have ended the touch because the last owner has
rejected it. We need to return from the function right now so we don't
attempt to dereference another touch client for early acceptance
processing.
Signed-off-by: Chase Douglas <chase.douglas@ubuntu.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Similar to the fix in fcda98c48610fd507ca0b89c6006a5497d9dc1c9. This
ensures we show the correct logical state of the buttons in device focus
events too.
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>
|
|
last.scroll remained on the last-submitted scrolling value but last.valuator
was changed whenever the slave device changed. The first scrolling delta
after a switch was then calculated as (last.scroll - new abs value), causing
erroneous scrolling events.
Test case:
- synaptics with a scrolling method enabled, other device with 3+ axes (e.g.
wacom)
- scroll on touchpad
- use other device
- scroll on touchpad
The second scroll caused erroneous button press/release events.
X.Org Bug 45611 <http://bugs.freedesktop.org/show_bug.cgi?id=45611>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|