summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-04hw/xwin/glx: Use silent rulesHEADmasterYaakov Selkowitz1-2/+2
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-05-04xfree86: use silent rules with sdksyms generationYaakov Selkowitz1-1/+1
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-05-04xfree86: respect EXEEXT in relink targetYaakov Selkowitz1-1/+1
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-05-04os: Add CryptoAPI as a choice of SHA1 implementationYaakov Selkowitz3-1/+59
Both Cygwin and MinGW can use Windows' native CryptoAPI for SHA1, saving a dependency on libgcrypt or OpenSSL. The necessary functions are in ADVAPI32.DLL, which is among the default lib flags and is already used in hw/xwin for accessing the registry. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
2012-05-02Merge remote-tracking branch 'whot/for-keith'Keith Packard1-8/+17
No conflicts here
2012-05-03Report touch emulated buttons in XIQueryPointer for XI 2.1 and earlierChase Douglas1-0/+14
XInput 2.1 and earlier clients do not know about touches. We must report touch emulated button presses for these clients. For later clients, we only report true pointer button presses. 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-05-02configure.ac: on MinGW, link with ws2_32 instead of winsock2Ryan Pavlik1-1/+1
ws2_32 is the correct name for the libary (even on 64 bit Windows :-)) Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2012-05-02configure.ac: MinGW doesn't have setuid binaries either.Ryan Pavlik1-0/+1
If the target platform isn't in a list of platforms we know don't use a setuid binary, we try to test if we can chown something to root. This test possibly won't give the right answer if we are cross-compiling, which is common for the MinGW target. This patch adds MinGW to the list of platforms we know don't use a setuid binary. Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2012-05-02configure.ac: auto-disable MITSHM if we lack IPCRyan Pavlik1-2/+6
The MITSHM extension uses SYSV IPC, but even if configure's test for IPC failed, MITSHM was still enabled by default, breaking MinGW builds by default. Unfortunately, fixing this exposes the fact that the HAVE_SYSV_IPC test wasn't being used for anything before and so we hadn't noticed it was failing on Cygwin. Change from using SHM_W|SHM_R flags (which aren't required by POSIX) to S_IRUSR|S_IWUSR flags (which are) Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2012-05-02Report logical button state in ProcXIQueryPointerChase Douglas1-9/+4
Physical button state is usually meaningless to an X client. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-01configure.ac: Make default configuration for MinGW disable unsupported ↵Jon TURNEY1-1/+3
extensions and DDXs Same as the default configuration for Cygwin, --disable-xorg and --disable-dmx DDX by default, and force --disable-xv and other unsupported extensions Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2012-05-01dix: when disabling a device, release all buttons and keysPeter Hutterer1-0/+1
A suspend-induced device disable may happen before the device gets to see the button release event. On resume, the server's internal state still has some buttons pressed, causing inconsistent behaviour. Force the release and the matching events to be sent to the client. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-01dix: don't emulate scroll events for non-existing axes (#47281)Peter Hutterer1-0/+3
Test case: - create a device with REL_HWHEEL and ABS_X and ABS_Y. evdev 2.7.0 will set that up as device with 1 relative axis - move pointer to VGA1 - xrandr --output VGA1 --off Warps the pointer to the new spot and calls GPE with the x/y mask bits set. When running through the loop to check for scroll event, this overruns the axes and may try to emulate scroll events based on random garbage in the memory. If that memory contained non-zero for the scroll type but near-zero for the increment field, the server would hang in an infinite loop. This was the trigger for this suggested, never-merged, patch here: http://patchwork.freedesktop.org/patch/9543/ X.Org Bug 47281 <http://bugs.freedesktop.org/show_bug.cgi?id=47281> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-01os: make timers signal-safePeter Hutterer1-2/+16
If TimerSet() is called from a signal handler (synaptics tap handling code) may result in list corruption if we're currently inside TimerSet(). See backtrace in https://bugzilla.redhat.com/show_bug.cgi?id=814869 Block signals for all list manipulations in the timers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-01dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURNMichal Suchanek2-10/+22
and fix resulting printf warning in dmxLogVisual Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-01TouchListenerAcceptReject: Warn and return early on bad listener indexChase Douglas1-0/+5
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Bryce Harrington <bryce@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-01os: Add -displayfd optionChase Douglas5-20/+66
This option specifies a file descriptor in the launching process. X will scan for an available display number and write that number back to the launching process, at the same time as SIGUSR1 generation. This means display managers don't need to guess at available display numbers. As a consequence, if X fails to start when using -displayfd, it's not because the display was in use, so there's no point in retrying the X launch on a higher display number. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Tested-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-01xserver: Fix out-of-tree buildMichal Suchanek1-1/+1
Fixes regression caused by ccb3e78124fb05defd0c9b438746b79d84dfc3ae Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-01Xi: return BadValue on XIQueryVersion if the version is less than first callPeter Hutterer2-20/+134
Clients that use plugin systems may require multiple calls to XIQueryVersion from different plugins. The current error handling requires client-side synchronisation of version numbers. The first call to XIQueryVersion defines the server behaviour. Once cached, always return that version number to any clients. Unless a client requests a version lower than the first defined one, then a BadValue must be returned to be protocol-compatible. Introduced in 2c23ef83b0e03e163aeeb06133538606886f4e9c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-26XQuartz: Make sure we tell startx the correct server binary to use in our ↵Jeremy Huddleston1-1/+1
fallback path With multiple servers installed, we can't be certain if X is Xorg or Xquartz Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23xfree86: workaround crash on closeMichal Suchanek1-3/+8
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653 Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Knut Petersen <Knut_Petersen@t-online.de>
2012-04-23glapi: Correct size of allocated _glapi_table structJonas Maebe1-1/+1
The __glapi_gentable_set_remaining_noop() routine treats the _glapi_struct as an array of _glapi_get_dispatch_table_size() pointers, so we have to allocate _glapi_get_dispatch_table_size()*sizeof(void*) bytes rather than sizeof(struct _glapi_struct) bytes. Signed-off-by: Jonas Maebe <jonas.maebe@elis.ugent.be> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23XQuartz: darwinPointer now sends both absolute and relative motionJeremy Huddleston4-52/+56
This should hopefully help out wine clients that were continuing to have issues after the earlier changes. http://xquartz.macosforge.org/trac/ticket/548 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23XQuartz: Add a hack to better handle clicky wheel scroll miceJeremy Huddleston1-2/+109
We loose information from AppKit being in our way. Before adopting smooth scrolling, we always rounded-up the number of scroll button clicks per NSEvent. Now, the scroll value is accumulated in the dix, and clicky scroll wheels with legacy X11 clients are seeing an accumulation of error due to so many translations (button press to smooth scrolling value in AppKit, passed to the dix, and then synthesized into a button press). This attempts to make the situation better. http://xquartz.macosforge.org/trac/ticket/562 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first ↵Jeremy Huddleston1-2/+2
screen Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23XQuartz: Separate out tablet and mouse event delivery into separate functionsJeremy Huddleston3-139/+116
This should have no immediate impact aside from fake mouse buttons no longer working with tablets (where they aren't needed or desired anyways). This prepares us for future changes. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23XQuartz: Correct calculation of the size of our file descriptor array in ↵Jeremy Huddleston1-1/+1
console_redirect Reported-by: Joe Rohde <joer@valvesoftware.com> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23XQuartz: Fix a deadlock in pre-dispatch codeJeremy Huddleston1-1/+1
The fact that this has been in place so long makes me really wonder if anybody cares about this running in Tiger or Leopard. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23test: Fix make distJeremy Huddleston1-2/+3
It seems like make dist should be doing te right thing without this commit, but it's not in some cases. Don't ask me to explain why. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23os: Annotate OsVendorFatalError as _X_ATTRIBUTE_PRINTFJeremy Huddleston1-1/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-By: Michal Suchanek <hramrach@gmail.com>
2012-04-23xres: Fix build without compositeJeremy Huddleston2-1/+5
Regression from: b8d0d19a6d410776b53a41e7cae90f68d4b22bb7 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Tested-By: Michal Suchanek <hramrach@gmail.com>
2012-04-19Merge remote-tracking branch 'yselkowitz/master'Keith Packard19-32/+114
Pull in Cygwin for XFree86
2012-04-19Export CompositeClientWindowTypeKeith Packard3-1/+5
Make sure CompositeClientWindowType is visible for XResource v1.2 Signed-off-by: Keith Packard <keithp@keithp.com>
2012-04-19Merge remote-tracking branch 'whot/for-keith'Keith Packard5-88/+191
Touch input changes from Chase
2012-04-19Merge branch 'input-fixes' of git://people.freedesktop.org/~cndougla/xserver ↵Peter Hutterer6-432/+669
into for-keith
2012-04-18Replay original touch begin event instead of generated begin eventChase Douglas1-3/+15
The generated event does not have axes other than X and Y and has a newer timestamp. In particular, the newer timestamp may be newer than the real touch end event, which may be stuck in the syncEvents queue. If a client uses the timestamps for grabbing bad things may happen. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Update currentTime in dispatch loopChase Douglas1-0/+3
A request, like input device grabs, may check a request timestamp against currentTime. It is possible for currentTime to lag a previously sent event timestamp. If the client makes a request based on such an event timestamp, the request may fail the validity check against currentTime unless we always update the time before processing the request. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Update device state including when touch record does not existChase Douglas2-11/+3
If a touch is physically active, the pointer core state should reflect that the first button is pressed. Currently, this only occurs when there are active listeners of the touch sequence. By moving the device state updating to the beginning of touch processing we ensure it is updated according to the processed physical state no matter what. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Check other clients' core masks properly when adding touch listenerChase Douglas1-4/+4
The current code checks the core event mask as though it were an XI mask. This change fixes the checks so the proper client and event masks are used. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Ensure touch is ended when last listener is rejectedChase Douglas1-8/+2
Currently, the touch is only logically ended if the touch has physically ended. If the touch hasn't physically ended, the touch record is never ended. If there aren't any more listeners, we don't need to keep the dix touch record around any more. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Create a new dix touch record for an emulated touch with no listenersChase Douglas2-0/+33
As a special case, if a still physically active pointer emulated touch has no listeners and the device is explicitly grabbed for pointer events, create a new dix touch record for the grab only. This allows for clients to "hand off" grabs. For example, when dragging a window under compiz the window decorator sees the button press and then ungrabs the implicit grab. It then tells compiz to grab the device, and compiz then moves the window with the pointer motion. This is racy, but is allowed by the input protocol for pointer events when there are no other clients with a grab on the device. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Rename TouchEnsureSprite to TouchBuildSprite and event type checksChase Douglas3-16/+8
The function will be used for building a sprite for pointer emulation after an explicit device grab. This commit refactors the code so that TouchBuildSprite will function with any event type and moves the checks to the caller. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18When activating an explicit grab, update owning listenerChase Douglas1-0/+33
Pointer passive grabs may be changed by the grabbing client. This allows for a selecting client to change an implicit grab to an active grab, which is the mechanism used for pop-up windows like application menus. We need to do the same thing with touches. If the grabbing client is the owner of a touch sequence, change the listener record to reflect the new grab. If the grabbing client is not the owner, nothing changes for the touch. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Don't deactivate implicit pointer grab on fake touch end eventChase Douglas1-0/+1
Fake touch end events are generated by touch acceptance and rejection. These should not cause implicit pointer grabs to be deactivated. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18End a pointer emulated touch event only on a "real" end eventChase Douglas1-1/+2
Fake end events are generated by touch acceptance or rejection. These should not end the touch point. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18On touch accept, only process end event for owner if it has seen the endChase Douglas1-1/+10
We still need to generate the touch ownership event to process the ending of the touch event in the case where the owner has the end already. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Fix copy/paste error from before git history in UpdateCurrentTimeIf()Chase Douglas1-1/+1
See UpdateCurrentTime() for reference. I don't know what bug this might trigger, but it wouldn't hurt to fix this. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18When deactivating an explicit pointer grab, reject all grabs on touchesChase Douglas1-0/+11
Explicit pointer grabs are placed at the head of the touch listener array for pointer emulated touches. If the grab is deactivated, we must remove it from all touches for the device. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Accept touch sequence for pointer listener after second event deliveryChase Douglas1-0/+6
This is a bit of unimplemented code for touchscreen pointer emulation. A pointer grabbing client currently never accepts the touch sequence. The sequence must be accepted once any touch-derived event is irrevocably delivered to a client. The first pointer event, derived from a touch begin event, may be caught in a sync grab and then replayed. This is essentially a revocable delivery of an event. Thus, we must wait till a non-begin event is delivered. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-18Split out helper function TouchListenerAcceptReject()Chase Douglas3-34/+43
This will be used for accepting and rejecting touches in the future. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>