summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-12-03Version bumped to 1.9.2.902 (1.9.3 RC2)xorg-server-1.9.2.902Jeremy Huddleston1-2/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03XQuartz: RandR: Fix mode changing for multi-monitor configurations.Jeremy Huddleston1-10/+13
This just fixes the regression whereby we couldn't switch between the legacy fullscreen mode and rootless on multi-monitor configurations. This was happening because ref wasn't being set in these cases (since we don't ever actually change CG modes), so we failed a CFEqual. Setting the references fixes this regression and places us one step closer to more mode RandR mode switching in multi-monitor configurations. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 714b68d9e5bf624a6703f168e0f7dc980e88e8c0)
2010-12-03XQuartz: Cleanup some compiler warningsJeremy Huddleston2-2/+2
Mark __crashreporter_info__ as __attribute__((__used__)) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 14f00449eb81771c01fffcdaf3dd697cdf4e41de)
2010-12-03XQuartz: Disable the Mac OS X screensaver when in full screen modeJeremy Huddleston1-0/+37
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit ca431371a23a2b9ad36c1d64e11ea41d5e4e5f04)
2010-12-03Fix Xdmx and Xephyr build when DTrace support is enabledNicolas Peninguy1-2/+2
This fixes the following build errors when DTrace is enabled (--with-dtrace): CCLD Xdmx /usr/bin/ld: ../../os/os.O: undefined reference to symbol 'dladdr@@GLIBC_2.2.5' /usr/bin/ld: note: 'dladdr@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line CCLD Xephyr ../../../os/os.O: In function `TimerForce': /home/nico/work/xserver/os/WaitFor.c:481: multiple definition of `TimerForce' ../../../os/os.O:/home/nico/work/xserver/os/WaitFor.c:481: first defined here Signed-off-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 311cad33155c64ed996418808727fc417168592e)
2010-12-03Return Success from generate_modkeymap() when max_keys_per_mod is zeroAdam Tkac1-11/+13
max_keys_per_mod equal to zero is a valid situation so generate_modkeymap should not return BadAlloc in this case. Signed-off-by: Adam Tkac <atkac@redhat.com> Reviewed-by: Patrick E. Kane <pekane52 at gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 05e616767e5b7e60b92d31c4042ded5892dce6d4)
2010-12-02render: Fix byteswapping of gradient stopsAndrea Canciani1-2/+2
The function swapStops repeatedly swaps the color components as CARD16, but incorrectly steps over them as if they were CARD32. This causes half of the stops not to be swapped at all and some unrelated data be swapped instead. Signed-off-by: Andrea Canciani <ranma42@gmail.com> Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit dab064fa5e0b1f5c67222562ad5367005832cba1)
2010-12-02dix: do not use bit-wise operators on the boolean result of BitIsOnFerry Huberts1-6/+6
Performing bit-wise operations on a boolean amounts to mixing types, is confusing and basically incorrect; one should only perform logical operations on booleans. Performing such operations relies on the implementation detail that a boolean is in fact an integer and that its value FALSE is implemented as zero. Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit b16964910d29c0bd039e8bb48bcf1199d709fe3e)
2010-12-02dix: remove now unnecessary !! before BitIsOn()Peter Hutterer1-4/+4
The macro has been changed to do this already, no need for double not-not-ing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 23e3d1f23318ce69623f91908f888a09f8b74ac2)
2010-12-02include: let BitIsOn() return a boolean value.Jeremy Huddleston1-1/+1
Simply returning the mask bit breaks checks like BitIsOn(mask, 0) != BitIsOn(mask, 1); as used in 048e93593e3f7a99a7d2a219e1ce2bdc9d407807. The naming of this macro suggests that it should return boolean values anyway. This patch also adds a few simple tests for these macros to make sure they don't accidentally break in the future. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pat Kane <pekane52@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 42dc91e32a02b6b21ff5c45f465f3349e5822615)
2010-12-02xfree86: add missing linebreak in error message.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net> (cherry picked from commit b31df0439fe336a43a2355e2f1fb223d86045a05)
2010-12-02xfree86: Fix rotation of 2-color non-interleaved cursor imagesAaron Plattner1-19/+43
When RandR 1.2's transformation code is enabled, it rotates the cursor image so that it appears upright on a rotated screen. This code completely mangles 2-color cursors on hardware where the the mask and source images are not interleaved due to two problems: 1. stride is calculated as (width / 4) rather than (width / 8), so the expression (y * stride) skips two lines instead of one for every time y is incremented. 2. cursor_bitpos ignores the 'mask' parameter if the hardware doesn't specify any of the HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_* flags. To fix this, refactor the code to pass the whole xf86CursorInfoPtr through to cursor_bitpos and compute the correct stride there based on the flags. If none of the SOURCE_MASK_INTERLEAVE flags are set, use the total cursor size to move the 'image' variable into the mask part of the image before computing the desired byte pointer. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Cyril Brulebois <kibi@debian.org> (cherry picked from commit ffcbfa0063bdc7c9ad5ac724285c7b6e67044c18)
2010-12-02Fix screen number checks.Cyril Brulebois3-5/+5
screenInfo.numScreens is not a valid screen number, they go from 0 to numScreens - 1. Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 279ef1ffd787dba2f0d5056849b9cb15d36aa3eb)
2010-12-02DGA: fix screen number checkJulien Cristau1-23/+23
screenInfo.numScreens is not a valid screen number, they go from 0 to numScreens - 1. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 8684543021b9b1aa165b1bc69bc58685cb5942c1)
2010-12-02xfree86: store the screen's gamma information on init.Bill Nottingham1-0/+4
This fixes a gamma issue on vt switch observed with KDM. VT switching away and back would result in a black screen. Avoid this by storing the current gamma information on init. https://bugzilla.redhat.com/show_bug.cgi?id=533217 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> (cherry picked from commit 566d09a5cd6452ee2e05e23d2205e7c3aa31f0da)
2010-12-02xfree86: apply gamma settings on EnterVT.Adam Jackson1-0/+6
When entering the VT, re-apply the saved gamma settings for each screen. 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> (cherry picked from commit c050aa2f5fa6a7ff8ce4f91def14ca44f799f067)
2010-12-02Xi: move property reset from extension shutdown to init.Peter Hutterer1-2/+2
If any part of the stack calls XIGetKnownProperty during device shutdown the property is re-initialized before the server generation resets, leaving the value invalid again. Move the reset to the extension init which happens before input devices are initialized before the first property is requested. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> (cherry picked from commit 5cd11d2356d153840f1b429bdb8284367f8dc468)
2010-11-26XQuartz: Localization UpdatesJeremy Huddleston20-141/+164
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 97b9bb1e2cebbb769ef347455d9c7979d19de99f)
2010-11-26XQuartz: Remove existing localization files on install to avoid conflictsJeremy Huddleston1-1/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit f9fbafa1a07f951e89f208bf4928a0bf37b67cfe)
2010-11-26XQuartz dri: Don't check CoreGraphics versionJeremy Huddleston1-112/+0
The version check is hackish, and I highly doubt anyone using this code is on a version of OS X that predates this support (10.2 has support for it). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 6eed13ad5998ba80296bba2bb3f89928ee51194a)
2010-11-23edid: Fix the HDTV sync pulse adjustmentAdam Jackson1-2/+2
Simple typo, should have been adjusting the horizontal timings consistently since we're not trying to mangle vertical at all. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Patrick E. Kane <pekane52@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit b2f9ce201cc2a14d5d6ad055b46c9317b040ec2e)
2010-11-23x86emu: fix jump_near_IMM to handle DATA: flag correctly.Luc Verhaegen1-6/+14
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24348 Before (data flag ignored -> broken): 66 DATA: e944f1 JMP 1ff6 After (fixed): 66 DATA: e944f1ffff JMP 00001ff8 This subtle difference in the length of decoded instruction meant that the VBE call jumped to the routine setting AX=0x14F (VBE Failed) instead of the routine that set AX=0x4F (VBE success). The ability to run the same code in vm86 significantly aided the debugging of this issue. Those X.org developers who would like to drop vm86 better take special care towards _all_ vesa bugs, as those will expose further issues. Patch applies easily to even xserver 1.4.2. Signed-off-by: Luc Verhaegen <libv@skynet.be> Tested-by: Luc Verhaegen <libv@skynet.be> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit cc2c73ddcb4370a7c3ad439cda4da825156c26c9)
2010-11-23Do not trap access to timer and keyboardSamuel Thibault2-0/+11
Disable timer/keyboard trapping on GNU/Hurd for now Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these ports, and the int10 wrapper is not emulating them. It's effectively what happens in the Linux variant too, as iopl() is used there, making the ioperm() meaningless. Signed-off-by: Olaf Buddenhagen <antrik@users.sf.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit a6c64d96456d794b2f3ce40915922a3fba636b95)
2010-11-23DRI2: Avoid call to NULL pointerPauli Nieminen1-4/+7
DDX driver may implement schedule swap without GetMSC. In that case we can't call GetMSC in DRI2SwapBuffers. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> CC: Keith Packard <keithp@keithp.com> CC: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 383dfe23f1641435c0713f8a56424814a156af8e)
2010-11-23modes: improve aspect ratio match for classic driversOlivier Fourdan1-5/+59
After we infer the aspect ratio for the screen, we pick the largest mode matching that aspect ratio from the best mode pool available. We then clamp virtual size to that mode, and run the resulting mode list through the driver's ValidMode hook. In doing so we might filter away our initial guess. If this happens we shrink the default mode to the next largest mode from _any_ mode pool. This is usually wrong, and we should instead pick the next aspect-matched mode from the best available mode pool (as always, user then driver then default). Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 7bb653bedceb6180a0361ead1c612839e776ce98)
2010-11-15XQuartz: Don't use bashism in uninstall-hookJeremy Huddleston1-1/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-15Xext: panoramiXprocs: fix typoLinus Arver1-1/+1
This fixes a typo introduced in commit 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1. The pointer pDst was changed unintentionally to pWin from a copy/paste error. This resulted in all QT-based apps and some tcl/tk ones (like fontforge) to crash X 1.9 on starting up, when Xinerama was enabled. Bug report: https://bbs.archlinux.org/viewtopic.php?id=106125 Signed-off-by: Elie Bleton <drozofil@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Tested-by: Linus Arver <linusarver@gmail.com> (cherry picked from commit 78f94f19aab66a1e5331df0ce29f36e310b4195d)
2010-11-14test: input - set valuators mask for event to core conversionChase Douglas1-0/+2
Commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 adds a requirement to event to core conversion that at least one of the X or Y valuators are set in the valuator mask. This commit fixes the event conversion test to be compliant. 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> (cherry picked from commit 290af0418f8c94355e42ad81aa7779b90e173fc9) Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-14ddc: Don't probe for DDC/CI or EEPROMAdam Jackson1-4/+0
For whatever reason, some (broken) monitors will crash if you do this. We're not actually using this information for anything, so let's just not do it. Originally reported as http://bugzilla.redhat.com/620333 Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit d2064fbb687839c297a851a5d85f32dfbbe4a0d5)
2010-11-13Version bumped to 1.9.2.901 (1.9.3 RC1)xorg-server-1.9.2.901Jeremy Huddleston1-2/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-13XQuartz: Fix make distcheckJeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-13dix: Fix make distcheckJeremy Huddleston1-0/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-13test: Fix missing xkbsrv.h include.Cyril Brulebois1-0/+1
Otherwise, building fails with CFLAGS="-Wall -Werror" this way: | protocol-common.c: In function ‘init_simple’: | protocol-common.c:159: error: implicit declaration of function ‘XkbInitPrivates’ | protocol-common.c:159: error: nested extern declaration of ‘XkbInitPrivates’ Signed-off-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit c481dae0dc89d8d50cac23210023d75bfaf6012b)
2010-11-13DOC: Only build dtrace documentation with --enable-docsJeremy Huddleston2-0/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 291c39dfef84d1b204d7f5e63e925dee2dbdaca7)
2010-11-13shadow: Optimize shadowUpdatePacked(). (#26973)Adam Jackson1-2/+2
Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit f0b4df99486066ad0e638b3b5debc905bc8ef1c4)
2010-11-13Set DamageSetReportAfterOp to true for the damage extensionKristian Høgsberg1-0/+1
Change the damage extension reporter to queue up events after we chain to the wrapped functions. Damage events are typically sent out after the rendering happens anyway, since we submit batch buffers from the flush callback chain and then flush client io buffers. Compositing managers relie on this order, and there is no way we could reliably provide damage events to clients before the rendering happens anyway. By queueing up the damage events before the rendering happens, there's a risk that the client io buffer may overflow and send the damage events to the client before the driver has even seen the rendering request. Reporting damage events after the rendering fixes this corner case and better corresponds with how we expect this to work. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 8d7b7a0d71e0b89321b3341b781bc8845386def6) [anholt: re-applied to revert the revert, now that the cause of the revert is fixed] Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 333b6ed26e36735ef72f314a3f8c4ec565af223f)
2010-11-13Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.Eric Anholt6-11/+8
In all these cases, any rendering implied by this damage has already occurred, and we want to get the damage out to the client. Some of the DamageRegionAppend calls were explicitly telling damage to flush the reportAfter damage out, but not all. Bug #30260. Fixes the compiz wallpaper plugin with client damage changed to reportAfter. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit f36153e3ef6b13a87d016caab09cc9be274b0dd5)
2010-11-13os: Fix BigReq ignoring when another request is pendingAaron Plattner1-3/+16
Commit cf88363db0ebb42df7cc286b85d30d7898aea840 fixed the handling of BigReq requests that are way too large and handles the case where the read() syscall returns a short read. However, it neglected to handle the case where it returns a long read, which happens when the client has another request in the queue after the bogus large one. Handle the long read case by subtracting the smaller of 'needed' and 'gotnow' from oci->ignoreBytes. If needed < gotnow, simply subtract the two, leaving gotnow equal to the number of extra bytes read. Since the code immediately following the (oci->ignoreBytes > 0) block tries to handle the next request, advance oci->bufptr immediately instead of setting oci->lenLastReq and letting the next call to ReadRequestFromClient do it. Fixes the XTS pChangeKeyboardMapping-3 test. CASES TESTS PASS UNSUP UNTST NOTIU WARN FIP FAIL UNRES UNIN ABORT -Xproto 122 389 367 2 19 0 0 0 1 0 0 0 +Xproto 122 389 368 2 19 0 0 0 0 0 0 0 Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit c80c41767eb101e9dbd8393d8cca7764b4e248a4)
2010-11-13mi: Integer overflow for dashed lines longer than 46340. #31093Siddhesh Poyarekar1-1/+1
Lines of length greater than 46340 can be drawn with one of the coordinates being negative. However for dashed lines, miPolyBuildPoly overflows the int type when setting up edges for a section of the dashed line. This results in the dashed segments not being drawn at all. Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit be7cf14c365c8ee0d69c4335e01316bcfcba69a4)
2010-11-13os: include dix-config.h, not xorg-config.hJulien Cristau2-4/+4
os/strlc{at,py}.c were trying to include xorg-config.h, which is not available in dix. Signed-off-by: Julien Cristau <jcristau@debian.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 69e8e1b0b95a325da3e3a2d76d092e7131baa9ad)
2010-11-13hurd: Fix use of deprecated iopl deviceSamuel Thibault2-15/+15
Fix Xserver on GNU/Hurd into using the "mem" device instead of the deprecated "iopl" device. Reviewed-by: Olaf Buddenhagen <antrik@users.sf.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> (cherry picked from commit f72aadd38b730c46c0a027dacbbb57f03068383d)
2010-11-13Revert "Set DamageSetReportAfterOp to true for the damage extension" (#30260)Aaron Plattner1-1/+0
This commit breaks the Compiz "Wallpaper" plugin. This reverts commit 8d7b7a0d71e0b89321b3341b781bc8845386def6. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 1a0d9324b3d9fd93e685066e0e5cea0611878c0d)
2010-11-13kdrive: Fix linking with tslib, with -Wl, --as-needed. #30600Michał Górny1-1/+1
Change the library order in TSLIB_LIBS variable, placing ${TSLIB_LIBS} after the local static libraries. This fixes linking with -Wl,--as-needed. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30600 Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 8806a04f7f028dd9f6a7ff5c36e460d3895c7deb)
2010-11-13kdrive: Fix tslib check fallback to set TSLIB_LIBS. #30599Michał Górny1-1/+4
If pkg-config is unable to find tslib but the fallback check does find it, the compilation continues with tslib support enabled though TSLIB_LIBS are unset. Thus, the compilation fails with a linking error on tslib functions. This patch sets TSLIB_LIBS to '-lts' whenever the tslib fallback check succeeds. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30599 Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit c7e436e9987a6fb0876c63e96f59ff4c20b4bef0)
2010-11-10KDrive: Fix error handlig in tslib driverPaulius Zaleckas1-4/+11
If ts_open() fails and return NULL, then next call to ts_fd() segfaults because of NULL dereference. There is no need to check output of ts_fd() as ts_open() did this internally. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 8990b31214bcbc08090604147287455bfde91c11)
2010-11-10dix: advance parent window pointer when no node is foundTiago Vignatti1-3/+3
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit a210068c5222acbdb04db17cb8cef314735bf977)
2010-11-10fix a sign problem with valuator data.Joe Shaw2-2/+2
Without this patch, any negative valuator value is wrong when returned from XQueryDeviceState(). This is a regression from at least xserver 1.4. Valuator data is set in dix/getevents.c:set_valuators() by copying signed int values into an unsigned int field DeviceEvent.valuators.data. That data is converted into a double with an implicit cast by assignment to axisVal[i] in Xi/exevents.c:UpdateDeviceState(). That double is converted back to a signed int in queryst.c:ProcXQueryDeviceState(). If the original value in set_valuators() is negative, the double value will be > 2^31 and the conversion back to a signed int is undefined. (Although I consistently see the value -2^31.) Fix this by changing the definition of DeviceEvent.valuators.data from uint32_t to int32_t. Signed-off-by: Joe Shaw <joeshaw@litl.com> 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> (cherry picked from commit e354ccac36a8ee3a23bdc845833c16a5646cc200)
2010-11-10xkb: init mapWidth and symsPerKey arrays to 0.Peter Hutterer1-2/+2
Helps debugging greatly, random 8 or 16 bit values can sometimes look like valid values, causing much excitement on the client front. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> (cherry picked from commit ca21a266224b6eff4fd817c2082d2e144f1ea58c)
2010-11-10Xi: reshuffle conditions for labeling a device as IsXExtensionKeyboard (#29046)Peter Hutterer1-2/+2
From the original bug reporter Ezra Reeves: "I did some more digging on this today, and I found that an HP branded wireless USB mouse has the same issue. With this mouse (as well as the logitech wireless mouse), the return from: xdev = XListInputDevices(GDK_WINDOW_XDISPLAY(rootwin), &ndevices_return); lists the USB device twice, but both have xdev[num].use == 3 (IsXExtensionKeyboard as defined in X11/XI.h). [...] Swapping the order of the test in Xi/listdev.c that determines whether a device is a pointer or a keyboard properly detects my devices (OEM USB wireless mouse/kb combo) -- one as a keyboard and one as a pointer." X.Org Bug 29046 <http://bugs.freedesktop.org/show_bug.cgi?id=29046> Reported-by: Erik Kilfoil <ekilfoil@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit fe8d122b133a43125cc961d2c3c811fa776f29c8)
2010-11-10xfree86: set mask for valuators 0/1 when emulating core events (#30267)Peter Hutterer1-0/+4
EventToCore as of the commit below won't generate core motion events if the valuator mask for x/y isn't set. For DGA, we work around this check by forcibly setting the mask in the event we pass down. commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 17 12:08:52 2010 +1000 dix: don't create core motion events for non-x/y valuators. X.Org Bug 30267 <http://bugs.freedesktop.org/show_bug.cgi?id=30267> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Andrew Randrianasulu <randrik@mail.ru> Tested-by: Andy Furniss Reviewed-by: Daniel Stone <daniel@fooishbar.org> (cherry picked from commit 9872e0f0115cd7d0543e55a1831facddf3aff90c)