summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-14miext: Remove redundant declaration.Michal Suchanek1-3/+0
Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14mi: Remove redundant declarations.Michal Suchanek1-59/+0
Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14exa: Remove redundant declaration.Michal Suchanek1-3/+0
Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14randr: Remove redundant declaration.Michal Suchanek2-19/+7
Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14xkb: Remove redundant declarations.Michal Suchanek2-2/+0
Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14xfixes: remove redundant declaration.Michal Suchanek1-1/+0
Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-09Merge remote-tracking branch 'whot/for-keith'Keith Packard3-55/+106
2012-05-08Fix RANDR’s gamma_to_ramp().James Cloos1-2/+2
In order to generate a 256-entry ramp in [0,65535] which covers the full range, one must mupliply eight-bit values not by 256 but rather by 257. Many years back – well before the RANDR extension was written, and before xorg@fdo – a similar bug fix was made to the DIX for converting client-supplied eight-bit color values into sixteen-bit values. Noticed by: Elle Stone and Graeme Gill. Signed-off-by: James Cloos <cloos@jhcloos.com>
2012-05-04hw/xwin/glx: Use silent rulesYaakov 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-03os/log: refactor loggingDaniel Kurtz1-51/+46
It is not safe to ever use an arbitrary (possibly user supplied) string as part of the format for a *sprintf() call. For example: 1. Name a Bluetooth keyboard "%n%n%n%n%n%n%n%n" 2. Pair it with a computer running X and try to use it 3. X is not happy when trying to do the following in xf86-input-evdev: xf86IDrvMsg(pInfo, X_CONFIG, "Device: \"%s\"\n", device); because LogVHdrMessageVerb() has put the %n from the device name into a format string of the form: "evdev: %n%n%n%n%n%n%n%n: Device: \"%s\"\n" Instead, build up a log message in place by appending successive formatted strings by sncprintf'ing to the end of the previous. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-03os/log: only write timestamp if a message is actually written to logfileDaniel Kurtz1-9/+9
The current code will write a timestamps into the logFile whenever the last message ended with a '\n' - even if the verb for that timestamp is at too high a level. This timestamp will sit there with no matching message until the next call to LogVWrite with a valid verb. In other words, in some cases, timestamps in the X.org.log are for some completely unrelated message that was previously ignored due to insufficient verbosity, and not for the message that appears next to it in the log file. We keep the current policy which appears to be to only apply timestamps if a message is actually written to a log file. That is, no timestamps on stderr, or in the mem buffer. Therefore, the timestamp stringification is moved to the conditional where it is used. Since logging uses a fixed length buffer, this patch also forces a '\n' whenever a buffer is terminated due to a too-long write request. This allows the newline detection to work even on overflow, and also cleans up the log a bit in the overflow case. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-03os/xprintf: add Xvscnprintf and XscnprintfDaniel Kurtz2-0/+56
Normal snprintf() usually returns the number of bytes that would have been written into a buffer had the buffer been long enough. The scnprintf() variants return the actual number of bytes written, excluding the trailing '\0'. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-03os/log: trivial cleanupsDaniel Kurtz1-2/+2
* space->tab * remove comment that doesn't make any sense Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.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>