summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-08Xext: avoid null-pointer dereference in XTestFakeInput (#59937)Alan Coopersmith1-3/+2
dv is still NULL at this point, so return firstValuator instead (which is the same value dv->firstValuator would be once initialized) X.Org Bug 59937 <http://bugs.freedesktop.org/show_bug.cgi?id=59937> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-08dmx: don't include dmx-config.h from xdmxconfig (#37502)Peter Hutterer1-3/+0
dmx-config.h is a server header which includes dix-config.h. That again defines a bunch of server-specifics, including setting the size of XID to 32 bit. libX11 uses unsigned long (8 bits on x86_64). XGCValues thus ends up being 16 bytes smaller in xdmxconfig than in the library, causing garbage to be sent to the server. X.Org Bug 37502 <http://bugs.freedesktop.org/show_bug.cgi?id=37502> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-01-23protocol-versions: Bump minor version of XIJasper St. Pierre1-1/+1
This was accidentally excluded when we added barriers. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-01-21config/udev: fix "removing GPU device" format string mistakeAaron Plattner1-1/+1
udev.c: In function 'device_removed': udev.c:270:9: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char *' [-Wformat] Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-01-21xserver: fix build regression since 91ab237358c6e33da854914d3de493a9cbea7637Dave Airlie1-2/+0
inputstr, double defines TouchListener typedef, maybe some gcc handles it, but not all. fixes tinderbox Reported-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-01-20Merge remote-tracking branch 'jturney/xserver-next'Keith Packard10-74/+157
2013-01-20Merge remote-tracking branch 'whot/for-keith'Keith Packard16-85/+93
2013-01-16hw/xwin: Stop assuming WS_EX_APPWINDOW style in WM_SHOWWINDOWJon TURNEY1-32/+27
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Use ITaskBarList interface to ensure show-on-taskbar state is ↵Jon TURNEY1-0/+13
updated correctly Use ITaskBarList interface to ensure that the taskbar notices if the window has changed it's style in a way which affects if the taskbar shows it or not. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Ensure full styling is applied when the window is mappedJon TURNEY1-20/+28
Move styling update code from WM_WM_HINTS_EVENT to a function UpdateStyle(), which is also invoked from WM_WM_MAP3, so everything which needs to be done to style the window happens when it is mapped (Otherwise, the appearance of the window is sensitive to the timing of the notification of the windows appearance hint properties being set relative to window creation. e.g. see [1]) [1] http://sourceware.org/ml/cygwin-xfree/2012-06/msg00004.html Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Make sure that WM_WM_HINTS_EVENT does nothing for override-redirect ↵Jon TURNEY1-0/+6
windows Future work: It looks like this code could be rationalized quite a lot: It might make sense to pull the checking for override-redirect up out of UpdateIcon() and UpdateName() and consolidate WM_WM_MAP2 and WM_WM_MAP3 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Add a new WM_WM_HINTS_EVENT event to update window styleJon TURNEY2-7/+53
Add a new WM_WM_HINTS_EVENT event to update window style if any of the properties which affect window style change Check PropertyNotify events for any of the window properties which we consider to decide on the window style, and update the window style by sending a WM_WM_HINTS_EVENT message to the WM. This allows the styling of the window to change during it's lifetime. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Move reshape code from winUpdateWindowPosition() to the map event ↵Jon TURNEY2-9/+16
handler Move reshape code, which was only used when handling a map event, from winUpdateWindowPosition(), to put it explicitly in the map event handler. Remove 'reshape' parameter from winUpdatePosition(). (Note that there's no handling of the ShapeNotify event to notice when the window shape changes, instead we hook the screen SetShape procedure and reshape the native window then) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Add missing include xwin-config.h to winglobals.hRyan Pavlik1-0/+4
winglobals.h checks if RELOCATE_PROJECTROOT is defined to see if a declaration of g_fLogFileChanged is needed, so must include xwin-config.h Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16include: Add RELOCATE_PROJECTROOT to xwin-config.h headerRyan Pavlik1-0/+3
RELOCATE_PROJECTROOT is AC_DEFINED in configure.ac, but currently has no effect as it doesn't appear in any AC_CONFIG_HEADER header. When packaged for Windows, we do not have a unix-style filesystem tree, where file needed by the X server can be found in fixed, absolute paths under the prefix (PROJECTROOT). Instead, the filesystem tree containing files needed by the X server and clients will be installed with the directory containing the X server executable as the root directory of that tree. (Typically, this will be in the Program Files directory, which does not have a fixed name, as it can be moved, localized, or added to to indicate x86 or x64 binaries) So, RELOCATE_PROJECTROOT is used to make a native Windows build of the X server look for various files (fonts, xkb data) in locations relative to the X server rather than at absolute paths, by translating those paths at run-time. Additionally the XKEYSYMDB, XERRORDB, XLOCALEDIR env vars checked by libX11 are set appropriately for clients started by the X server. Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-11Merge branch 'pointer-emulation-fixes-56558-v2' into for-keithPeter Hutterer5-62/+50
2013-01-11dix: typo fix in commentPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-11dix: fix error logging occuring in signal context of GetTouchEventsBenjamin Tissoires1-4/+4
GetTouchEvents is usually called in a signal context. Calling ErrorF for the error messages leads to X complaining about log: (EE) BUG: triggered 'if (inSignalContext)' (EE) BUG: log.c:484 in LogVMessageVerb() (EE) Warning: attempting to log data in a signal unsafe manner while in signal context. Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or ErrorFSigSafe(). The offending log format message is: %s: Attempted to start touch without x/y (driver bug) Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-11xfree86: don't access the old input handler after freeing itPeter Hutterer1-4/+6
Introduced in 323869f3298cbbfe864af9404a8aed1bf7995d79 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2013-01-11xf86: bump input ABI version to 19Dave Airlie1-1/+1
The changes to miPointerSetPosition interface from int->double breaks the SIS driver build, so time to bump this. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-11xfree86: update the device state for all DGA events (#59100)Peter Hutterer1-3/+6
DGA only handles master devices but it does intercept slave device events as well (since the event handlers are per event type, not per device). The DGA code must thus call into UpdateDeviceState to reset the button/key state on the slave device before it discards the remainder of the event. Test case: - Passive GrabModeSync on VCP - Press button - Enable DGA after ButtonPress - AllowEvents(SyncPointer) - Release button The button release is handled by DGAProcessPointerEvent but the device state is never updated, so the slave ends up with the button permanently down. And since the master's button state is the union of the slave states, the master has the button permanently down. X.Org Bug 59100 <http://bugs.freedesktop.org/show_bug.cgi?id=59100> Reported-by: Steven Elliott <selliott4@austin.rr.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2013-01-11xfree86: set event->detail for DGA pointer eventsPeter Hutterer1-0/+1
Reported-by: Steven Elliott <selliott4@austin.rr.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2013-01-11Fix two typos "requires an string value"Peter Hutterer2-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-11dix: don't filter RawEvents if the grab window is not the root window (#53897)Peter Hutterer1-3/+6
If a XI2.1+ client has a grab on a non-root window, it must still receive raw events on the root window. Test case: register for XI_ButtonPress on window and XI_RawMotion on root. No raw events are received once the press activates an implicit grab on the window. X.Org Bug 53897 <http://bugs.freedesktop.org/show_bug.cgi?id=53897> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-01-10hw/xwin: Fix MinGW build of winSetAppModelID.cJon TURNEY1-0/+1
Add missing #include <pthread.h> In file included from /jhbuild/checkout/xorg/xserver/hw/xwin/winSetAppUserModelID.c:31:0: /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:140:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:141:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:142:11: error: expected declaration specifiers or ‘...’ before ‘pthread_mutex_t’ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-10hw/xwin: Process one Windows message per wakeup, rather than all of them.Jon TURNEY2-18/+18
De-queuing Windows messages and X events happens in the same thread of execution. Draining the windows message queue can lead to the X event queue overflowing if lots of those windows messages cause X events (e.g. if a keyboard macro program has just dumped thousands of keypresses into the Windows message queue). See the mailing list thread [1] for more details. Processing one Windows message per wakeup, rather than all of them gives the X server a chance to do stuff as well after each message. [1] http://cygwin.com/ml/cygwin-xfree/2010-01/msg00056.html Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-10hw/xwin: Fix some comments in winkeybd.cJon TURNEY1-4/+4
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-10hw/xwin: Bring the X screen window to the front on a single left-click on ↵Jon TURNEY1-1/+1
the tray icon Bring the X screen window to the front on a single left click on the tray icon, like the comment says we do Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-08hw/xfree86: Require only one working CRTC to start the server.Keith Packard1-4/+11
Instead of requiring every mode set to complete successfully, start up as long as at least one CRTC is working. This avoids failures when one or more CRTCs can't start due to mode setting conflicts. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2013-01-09dix: remove already-moved hunkPeter Hutterer1-9/+0
Should've been removed in bc1f90a615018c05994fae3e678dd2341256cd82a, but got left here due to a botched rebase. Fixes stray button events sent to clients after deactivating an async pointer grab on a pointer-emulating-touch. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-01-09dix: check for the right device's xi2 maskPeter Hutterer1-1/+1
events.c: In function 'DeactivatePointerGrab': events.c:1524:51: warning: 'dev' may be used uninitialized in this function [-Wuninitialized dev is unset when we get here, the device to check is "mouse". Introduced in ece8157a59751b3ed492fb2e1eb8d5f20221e195. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-01-09dix: add resource type to touch listenersPeter Hutterer4-16/+16
Instead of guessing what resource type the listener is and what property to retrieve, store the resource type in the listener directly. Breaks XIT test cases: TouchGrabTestMultipleTaps.PassiveGrabPointerEmulationMultipleTouchesFastSuccession Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56557 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
2013-01-09input: Record grab pointer in TouchListenerKeith Packard5-29/+24
This places a pointer to the grab related to a TouchListener directly in the TouchListener structure rather than hoping to find the grab later on using the resource ID. Passive grabs have resource ID in the resource DB so they can be removed when a client exits, and those resource IDs get copied when activated, but implicit grabs are constructed on-the-fly and have no resource DB entry. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-09input: Pull TouchListener declaration to top-levelKeith Packard1-8/+10
No reason to have a struct declared inside another struct Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-09xkb: Do not use base group as an array index.Andreas Wettstein1-2/+8
The base group is not brought into range and, therefore, using it as an array index crashed the X server. Also, at this place, we should ignore locked groups, but not latched groups. Therefore, use sum of base and latched groups, brought into range. Reproducible with: key <FK07> { type= "ONE_LEVEL", symbols[Group1]= [ NoSymbol ], actions[Group1]= [ LatchGroup(group=-1, clearLocks) ] }; And hitting F7 will exceed the group level and access arbitrary memory. 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>
2013-01-09render: Unwrap early on the animated cursor BlockHandlerCarlos Garnacho1-1/+2
The loop above the previous call may end up triggering other handlers attaching to the same function slot, so unwrapping the handler after that could leave the just attached handler in a dangling but not unset state. This issue was most visible on the XO, where destroying a window with an animated cursor set and running would trigger this inconsistent state, never calling the miSpriteBlockHandler again after the animated cursor is unset. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-09mi: Ensure pointer emulating touch events update the spriteCarlos Garnacho1-1/+5
Different miPointerSpriteFuncRec implementations do a varying business at ultimately calling miPointerUpdateSprite(), this particularly fails when using the plain mi sprite on touch events, where the sprite is just moved/updated on cursor changes. So, ensure miPointerUpdateSprite() is called generically for pointer emulating touch events as with regular motion events. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-08dix: Make small bitfields that store enums unsignedAaron Plattner1-6/+6
Commit 31bf81772e146af79b0c456aae2159eba8b0280f changed the clientState field from a signed int to a signed int 2-bit bitfield. The ClientState enum that is expected to be assigned to this field has four values: ClientStateInitial (0), ClientStateRunning (1), ClientStateRetained (2), and ClientStateGone (3). However, because this bitfield is signed, ClientStateRetained becomes -2 when assigned, and ClientStateGone becomes -1. This causes warnings: test.c:54:10: error: case label value exceeds maximum value for type [-Werror] test.c:55:10: error: case label value exceeds maximum value for type [-Werror] The code here is a switch statement: 53 switch (client->clientState) { 54 case ClientStateGone: 55 case ClientStateRetained: 56 [...] 57 break; 58 59 default: 60 [...] 61 break; 62 } It also causes bizarre problems like this: client->clientState = ClientStateGone; assert(client->clientState == ClientStateGone); // this assert fails Also change the signedness of nearby bitfields to match. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Colin Harrison <colin.harrison at virgin.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-12-21test/xi2: fix compiler warningPeter Hutterer1-1/+1
protocol-xiwarppointer.c: In function ‘ScreenSetCursorPosition’: protocol-xiwarppointer.c:71:53: warning: declaration of ‘screen’ shadows a global declaration [-Wshadow] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-19Update to version 1.13.99.901 (1.14 RC1)Keith Packard1-3/+3
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-12-19Merge remote-tracking branch 'jeremyhu/master'Keith Packard3-147/+88
2012-12-19Merge remote-tracking branch 'yselkowitz/master'Keith Packard68-338/+338
I checked this patch with diff -w to check that it only affected whitespace.
2012-12-19Merge remote-tracking branch 'alanc/master'Keith Packard3-4/+10
2012-12-19Merge remote-tracking branch 'whot/barriers'Keith Packard21-464/+1464
Conflicts: Xi/xichangehierarchy.c Small conflict with the patch from Xi: don't use devices after removing them Was easily resolved by hand. Signed-off-by: Keith Packard <keithp@keithp.com>
2012-12-18EnableDisableExtensionError: Use ARRAY_SIZE rather than sentinelAlan Coopersmith1-3/+6
d785368e0e converted the other miinitext functions to use ARRAY_SIZE, and removed the sentinel, but missed EnableDisableExtensionError so passing an invalid extension name could cause the server to walk off the end off the list looking for a sentinel that wasn't there. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-18XQuartz: Don't add the 15bit visual any moreJeremy Huddleston Sequoia2-7/+14
Mountain Lion only supports 32bit backing stores, so don't use 15bit visuals until libXplugin adapts Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-12-18XQuartz: Revert some unfortunate auto-indenting mishaps with our ↵Jeremy Huddleston Sequoia1-140/+74
super-nested for-loops Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-12-18hw/dmx: fix build without GLXRob Clark1-1/+1
Fixes this compile break that showed up on arm recently: dmxinit.c:746:26: error: 'glxSupported' undeclared (first use in this function) dmxinit.c:746:26: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-12-17Support compilers with alternate spellings of typeofAlan Coopersmith1-0/+3
The AC_C_TYPEOF adds a #undef typeof to its autogenerated config.h.in template, but b8ab93dfbc7f292 didn't copy that to dix-config.h.in when HAVE_TYPEOF was, so the macro could claim typeof support but not make it work, when used with compilers like Solaris Studio 12.1 which only recognize it as __typeof__. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-18dix: don't copy the wrong event mask when activating a passive grabPeter Hutterer1-1/+4
GrabMask is a union of core, XI1 and XI2 masks. If a XI2 grab is activated, the value is a random pointer value, using it as mask has unpredictable effects. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Keith Packard <keithp@keithp.com>