summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-19Merge remote-tracking branch 'idr/glx-fixes'Keith Packard21-8886/+19670
2011-12-19dri2: Invalidate window pixmapsVille Syrjälä4-5/+7
While a redirected window is flipped, its pixmap may still be used as and EGL image and should also get invalidated. When sending invalidate events for a window, also send the events for its pixmap. Signed-off-by: Ville Syrjälä <syrjala@sci.fi> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19dri2: Invalidate DRI2 buffers for all windows with the same pixmap on swapKeith Packard1-1/+30
Without this, when a compositing manager unredirects a fullscreen window which uses DRI2 and page flipping, the DRI2 buffer information for the compositing manager's output window (typically the Composite Overlay Window or root window) may become stale, resulting in all kinds of hilarity. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35452 . [Original patch by Michel Dänzer <michel@daenzer.net>] [Tree walk optimized version by Keith Packard <keithp@keithp.com>] Signed-off-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19dri2: Always re-generate front buffer information when asked for it.Michel Dänzer1-0/+1
Otherwise we might keep stale cached information, e.g. after the driver performed page flipping. This is part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=35452 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19dri2: Initialize needInvalidate member of DRI2Drawable.Rami Ylimäki1-0/+1
If the client is not behaving correctly and swaps buffers before getting them, Valgrind will complain about uninitialized memory being used in DRI2InvalidateDrawable. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19dmx: force -fno-strict-aliasing for xinput examplePeter Hutterer1-28/+28
Compiler warning: xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing rules The code itself is the usual XInput client-side code: XEvent event; XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event; XNextEvent(display, &event); printf("%d\n", e->type); Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients must use pointer aliasing as above when using the XNextEvent API. Disable strict aliasing for this example. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast ↵Jeremy Huddleston3-7/+7
-Werror=pointer-to-int-cast Reported-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-12-19configure.ac: Make Xephyr dependency error message more informativeJeremy Huddleston1-5/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-12-19XQuartz: Provide in-tree implementation of strndup(3) if neededJeremy Huddleston1-0/+7
This function was added to Mac OS X 10.7, so we need to provide it for earlier releases. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-19glx: use dispatch.h instead of glapioffsets.hIan Romanick4-1178/+4
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-19glx: Regenerate GL API files from MesaIan Romanick13-7706/+19578
Adam reviewed the underlying changes in the Mesa generated scripts. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-19glx: Add stub implementations of next GLX extension functionsIan Romanick3-0/+88
Generated code from Mesa contains dispatch for GLX_ARB_create_context and GLX_ARB_create_context_profile. Provide stub implementations of these functions so that the GLX extension will link. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-19glx: Only declare GlxExtensionInit in one header fileIan Romanick1-2/+0
This silences the GCC warning: In file included from singlepixswap.c:36:0: glxext.h:47:13: warning: redundant redeclaration of 'GlxExtensionInit' [-Wredundant-decls] glxserver.h:80:6: note: previous declaration of 'GlxExtensionInit' was here Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-17Version 1.11.99.2 (1.12 snapshot 2)Keith Packard1-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-16xserver: check for elevated privileges not uid=0Antoine Martin5-24/+91
This allows us to run the server as a normal user whilst still being able to use the -modulepath, -logfile and -config switches We define a xf86PrivsElevated which will do the checks and cache the result in case it is called more than once. Also renamed the paths #defines to match their new meaning. Original discussion which led to this patch can be found here: http://lists.freedesktop.org/archives/xorg-devel/2011-September/025853.html Signed-off-by: Antoine Martin <antoine@nagafix.co.uk> Tested-by: Michal Suchanek <hramrach at centrum.cz> Reviewed-by: Jamey Sharp <jamey at minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-15dmx: fix distcheck failure, missing compsize.h in Makefile.amGaetan Nadon1-0/+2
which was added in commit: dmx: Build fix for -Werror=implicit-function-declaration 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>
2011-12-14configure: split the required modules upPeter Hutterer1-2/+16
We do the same thing for libraries and optional modules already, and it's much easier to read when one of them changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-14Merge remote-tracking branch 'whot/for-keith'Keith Packard29-592/+801
2011-12-13Merge branch 'for-whot' of git://people.freedesktop.org/~alanc/xserver into ↵Peter Hutterer4-12/+29
for-keith
2011-12-13dix: add a MAXEVENTS define for the number of core + extension eventsPeter Hutterer5-7/+8
Not including GenericEvents Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Walter Harms <wharms@bfs.de> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: move event filter retrieval helpers to inpututils.cPeter Hutterer4-21/+31
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: switch EventIsDeliverable to take the event type onlyPeter Hutterer2-8/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: move storing last.valuators into a helper functionPeter Hutterer1-12/+26
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: always allocate and set the grab's sync.eventPeter Hutterer2-7/+2
Allocate the memory at device creation time and always store the event, even if we're not frozen. This way we know which event triggered the grab. Since the event was never freed anyway except on device shutdown, this doesn't really change things much. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13input: replace GRABTYPE_* with the InputLevel enumsPeter Hutterer18-158/+152
They achieve the same thing, re-use the more generic InputLevel so we can convert to/fro easier. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13Add GrabIsPointerGrab and GrabIsKeyboardGrab helpersPeter Hutterer3-6/+21
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: move delivery stop condition out of event maskPeter Hutterer1-6/+7
Previously, this was only called if there was a mask match, so even if we had a no-propagate flag set or a stopAt window specified, if no mask triggered on the window we would recurse up to the root window and eventually deliver. Move this, so that the stopAt and do-not-propagate mask is honoured. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: split out core state and event state setting into helper functionsPeter Hutterer3-28/+44
no functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: move grab matching code into a helper functionPeter Hutterer1-21/+60
No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: split core grab interference check into helper functionPeter Hutterer1-18/+25
No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: compare the grab type, not the tempGrab typePeter Hutterer1-1/+1
No functional change. To get here, GrabMatchesSecond() needs to be TRUE and for that the two grab types must be identical. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: remove event type checkPeter Hutterer1-7/+0
Can't remember why this is there but we'll need to pass in XI2 events soon, so this check is obsolete. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: Split ActivatePassiveGrab() from CheckPassiveGrab()Chase Douglas2-89/+112
The changed logic means we don't require the explicit grab = NULL setting and early exit anymore. Not 100% of it, but if we see that message pop up in a log we know it's broken. 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>
2011-12-13dix: Move grab check and activation logic to CheckPassiveGrab()Chase Douglas1-180/+204
This is needed for future pointer emulation work. 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>
2011-12-13dix: move EventDeliveryState into a header file, we'll need it elsewherePeter Hutterer2-7/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13Xi: split updating button count and state into helper functionsPeter Hutterer1-12/+29
Functional change: for a button mapped to 0, the motionHintWindow is not updated to the NullWindow anymore. Before it got updated unconditionally to the button mapping. I have no idea what the practical effect of this is, but I guess it's closer to the correct behaviour: pressing a button that's logically disabled now does not disrupt the motion hint delivery. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13Xi: deduplicate button motion mask settingPeter Hutterer1-12/+25
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEventsPeter Hutterer1-8/+10
No functional change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: split grab event conversion and delivery into a helper functionPeter Hutterer2-72/+77
Effective functional change: XI2 events are checked with XACE now. DeliverOneGrabbedEvent is exported for future use by touch events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: replace conversion errors with BUG_WARN_MSGPeter Hutterer1-8/+9
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13dix: deduplicate event delivery codePeter Hutterer1-49/+62
Move all the event delivery code into DeliverOneEvent, based on the InputLevel we're sending to. Functional change: we now check XI2 events with XACE too. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13include: Add an InputLevel enumChase Douglas1-0/+6
Currently unused, but will be in the future. 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>
2011-12-12verify_internal_event: preserve constness of data pointerAlan Coopersmith1-1/+1
All we're using it for is ErrorF calls, so make it a const char * to stop gcc from warning: inpututils.c: In function 'verify_internal_event': inpututils.c:629:9: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Use const cast in BitIsOn macro to avoid angering gccAlan Coopersmith1-1/+1
Fixes gcc warnings such as: inpututils.c: In function 'valuator_mask_isset': inpututils.c:498:5: warning: cast discards qualifiers from pointer target type inpututils.c: In function 'CountBits': inpututils.c:613:9: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Fix deconstifying cast warning in xi2_get_typeAlan Coopersmith1-1/+1
Since we're just comparing values in the struct, cast it to a const xGenericEvent * to clear gcc warning of: events.c: In function 'xi2_get_type': events.c:193:5: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Include client name if available in PrintDeviceGrabInfoAlan Coopersmith1-9/+26
Also adds missing newline to first line of output. Before patch: [3581472.414] (II) Printing all currently active device grabs: [3581472.414] Active grab 0x1800000 (core) on device 'Virtual core pointer' (2): client pid 26174 uid 0 gid 10 [3581472.415] at 3581469139 (from active grab) (device thawed, state 1) [3581472.415] core event mask 0x0 [3581472.415] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581472.415] Active grab 0x1800000 (core) on device 'Virtual core keyboard' (3) : client pid 26174 uid 0 gid 10 [3581472.415] at 3581469139 (from active grab) (device thawed, state 1) [3581472.415] core event mask 0x3 [3581472.415] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581472.415] (II) End list of active device grabs After patch: [3581736.601] (II) Printing all currently active device grabs: [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core pointer' (2): [3581736.601] client pid 26741 /usr/bin/xscreensaver -nosplash [3581736.601] at 3581735000 (from active grab) (device thawed, state 1) [3581736.601] core event mask 0x0 [3581736.601] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core keyboard' (3) : [3581736.601] client pid 26741 /usr/bin/xscreensaver -nosplash [3581736.601] at 3581735000 (from active grab) (device thawed, state 1) [3581736.601] core event mask 0x3 [3581736.601] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581736.601] (II) End list of active device grabs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
2011-12-12xf86 parser: convert Error to a varargs macro to clear gcc format warningsAlan Coopersmith15-100/+100
Previously it always passed a format string with exactly one argument, using NULL when the format string needed none. Now pass the right number of arguments to clear gcc warnings of 'too many arguments for format'. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Add some printf format attributes suggested by gccAlan Coopersmith5-6/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12xf86Priv.h: Add some noreturn attributes suggested by gccAlan Coopersmith1-4/+2
Both functions call exit() at the end and have no other return path. Also correct comment/heading to reflect commit 6450f6ca7ee0 moving DoShowOptions into xf86Configure.c. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Remove duplicate declarations of KdAdd*Driver in kdrive.hAlan Coopersmith1-6/+0
Clears gcc warnings in every file that includes kdrive.h: kdrive.h:507:1: warning: redundant redeclaration of 'KdAddPointerDriver' kdrive.h:225:6: note: previous declaration of 'KdAddPointerDriver' was here kdrive.h:510:1: warning: redundant redeclaration of 'KdAddKeyboardDriver' kdrive.h:284:6: note: previous declaration of 'KdAddKeyboardDriver' was here Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>