summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-03-24XQuartz: Use doubles for input valuatorsJeremy Huddleston2-72/+59
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-24XQuartz: Xi: darwinPointer is now RelativeJeremy Huddleston1-2/+2
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>
2012-03-24XQuartz: Move our logs into an X11 subdirectoryJeremy Huddleston1-3/+9
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-23test: Fix 'make dist' for configurations that build the Xorg DDXJeremy Huddleston1-0/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-22Merge branch 'per-device-sync-counters' into for-keithPeter Hutterer14-94/+158
2012-03-22Xext: Add per-device SyncCountersPeter Hutterer4-5/+56
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>
2012-03-22Change lastDeviceIdleTime to be per-devicePeter Hutterer11-17/+25
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>
2012-03-22Xext: strdup() the SystemSyncCounter namePeter Hutterer2-2/+3
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>
2012-03-22Xext: store the bracket values for idle counters in the privatePeter Hutterer1-18/+27
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>
2012-03-22Xext: pass the counter into block/wakeup handlersPeter Hutterer1-4/+4
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>
2012-03-22Xext: add a private field to SyncSystemCountersPeter Hutterer2-0/+11
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>
2012-03-22Xext: localise pIdleTimeValueLess/GreaterPeter Hutterer1-12/+16
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>
2012-03-22Xext: localise use of IdleTimeCounterPeter Hutterer1-7/+9
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>
2012-03-22sync: Use a linked list instead of an array for SysCounterList.Jamey Sharp2-39/+17
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>
2012-03-22Merge branch 'dtrace-input-abi' into for-keithPeter Hutterer4-3/+201
2012-03-22dix: add dtrace probes to input APIPeter Hutterer4-3/+201
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>
2012-03-22Xext: SyncCreateSystemCounter returns a SyncCounter*Peter Hutterer2-7/+7
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>
2012-03-22dix: set raw event values before adding up relative values (#46976)Peter Hutterer1-4/+5
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>
2012-03-22Xext: remove needless /* parameter */ comments in declarationPeter Hutterer1-7/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Bryce Harrington <bryce@canonical.com>
2012-03-22dix: fix compiler warning "unused variable 'scr'"Peter Hutterer1-1/+0
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>
2012-03-22Xext: typedef QueryValue and BracketValue prototypesPeter Hutterer2-27/+14
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>
2012-03-22include: add an X_DEBUG message typePeter Hutterer2-0/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2012-03-22Xext: drop InitServertime() declaration.Peter Hutterer1-2/+0
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>
2012-03-22Use a new sprite trace for indirect touches when all touches have physically ↵Chase Douglas1-1/+2
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>
2012-03-22Xi: Fix TouchEnd to TouchUpdate change for one accepted grabChase Douglas2-9/+18
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>
2012-03-22xfree86: remove out-of-date commentPeter Hutterer1-3/+0
No idea what this was referring to but it goes past git history. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-22dix: IsFloating() on master devices is always falsePeter Hutterer1-1/+1
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>
2012-03-22Xi: prohibit multiple XIQueryVersion requests with different versionsPeter Hutterer1-0/+9
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>
2012-03-22dix: when rescaling from master, rescale from desktop dimensions (#46657)Peter Hutterer1-2/+4
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>
2012-03-22Xext: return BadAccess if PickPointer fails (#45796)Peter Hutterer1-0/+10
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>
2012-03-22XKB: Redirect actions defunct with Gtk3 (XInput?)Andreas Wettstein1-4/+22
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>
2012-03-21Indentation: Change '& stuff' to '&stuff'Daniel Stone17-56/+56
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>
2012-03-21Xinerama: Fix up obnoxiously-indented codeDaniel Stone1-14/+12
Comments inside of conditionals confuse indent to death. Which is fair enough really. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-21Introduce a consistent coding styleKeith Packard1258-259934/+264651
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>
2012-03-21Handle blank betweeen type and name in sdksyms.shKeith Packard1-1/+4
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>
2012-03-14Bump version number to 1.12.99.0Keith Packard1-2/+2
Now that 1.12 has branched, reset the version on master to a development number. Signed-off-by: Keith Packard <keithp@keithp.com>
2012-03-04Version bumped to 1.12xorg-server-1.12.0Keith Packard1-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-03-04test: add new test cases to .gitignoreGaetan Nadon2-0/+2
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>
2012-02-27dix: avoid NULL-pointer dereference on button-only devices (#38313)Peter Hutterer1-4/+15
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>
2012-02-22Revert "dix: don't XWarpPointer through the last slave anymore (#38313)"Jeremy Huddleston1-14/+7
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>
2012-02-22XQuartz: Short-circuit activateX:Jeremy Huddleston1-0/+3
This also avoids a deadlock when calling activateX: before the server thread has initialized Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-22XQuartz: Actually install the new localesJeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-22Merge remote-tracking branch 'whot/for-keith'Keith Packard2-12/+20
2012-02-15Keep virtual core pointer touch class around if new slave doesn't have oneChase Douglas1-6/+3
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>
2012-02-15Don't clobber virtual core pointer touches array lengthPeter Hutterer1-5/+13
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>
2012-02-15Don't dereference a touch after it has been ended when punting to next ownerChase Douglas1-0/+1
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>
2012-02-15Focus event button state must show the logical buttons, not physical buttonsChase Douglas1-1/+1
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>
2012-02-14dix: reset last.scroll when resetting the valuator (#45611)Peter Hutterer1-0/+2
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>
2012-02-13XQuartz: Build fix for possible conflict of BOOL typeJeremy Huddleston1-2/+5
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-11Bump to version 1.11.99.903 (1.12 RC3)xorg-server-1.11.99.903Keith Packard1-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com>