In preparation for adding more sync object types
that will need Await requests of their own, factor
out some setup and finalization code from
ProcSyncAwait() into SyncAwaitPrologue() and
SyncAwaitEpilogue()
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Update all the functions dealing with Await
sync triggers handle generic sync objects
instead of just counters. This will
facilitate code sharing between the counter
sync waits and the fence sync waits.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
SyncObject is now the base type for SyncCounter.
Data to be used by all sync types is stored in
the base object. SyncCounter can be safely cast
to SyncObject, and a SyncObject can be cast to
the correct type based on SyncObject::type.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Most extensions have a version defined
in the protocol headers, and also in the
server's protocol-versions.h. The latter
defines which version the server advertises
support for. Sync wasn't included in
protocol-versions.h, and was advertising
support for whatever was in the protocol
headers the server was built against.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Single allocation point for input devices, most notably a single point to
reset default values.
Without this patch, the file descriptor default was -1 for hotplugged
devices and 0 for config devices. Drivers that don't overwrite the default
themselves would thus fail if configured in the xorg.conf.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Options set in the configuration file were unconditionally overwritten by
the server. Merge the already existing options and the new options together
instead of just overwriting ones.
Introduced in commit 2199842ed5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Sep 2 10:52:54 2010 +1000
xfree86: remove extraOptions field from IDevRec.
X.Org Bug 32115 <http://bugs.freedesktop.org/show_bug.cgi?id=32115>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: David Ronis <ronis@ronispc.chem.mcgill.ca>
Some devices should be initialised as floating from the start (e.g.
Joysticks and accelerometers benefit from this). Currently users use the
"SendCoreEvents" "off" flag for this, which isn't the most appropriate
naming.
Add an option "Floating", deprecate the others. Still parsed and handled by
the server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
It is currently assumed that an event button delieved to a master device
corresponds to the slave button states. However, the event button is a
logical (mapped) slave button and slave button states correspond to
physical (unmapped) slave buttons. This leads to incorrect update of the
master button state and incorrect events devlivered to clients. Fix the
situation by taking the slave button map into account when querying a
slave button state.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24887
Signed-off-by: Eoghan Sherry <ejsherry@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The subtype in the DGA event is the core type and all ET_ event types (where
applicable) are identical to the core types. Thus the switch statement below
will work as required and assign the right master device.
Fixes a crasher bug on keyboard devices with valuators. If a device sends a
motion event while grabbed and a DGA client is active (but has not selected
input through DGA), the valuator event is posted through the VCK and
eventually results in a NULL-pointer dereference on dev->valuator.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
XI 1.x events still contain absolute coordinates anyway. By the time we get
to the InternalEvent to XI event conversion, the valuators are already
absolute.
Stopping because of a different mode on a valuator is not necessary.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
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>
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>
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>
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>
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>
Doesn't seem to be any reason to just not pass the error string
as another argument directly to LogVWrite()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
15ac25627e removed the "/" from the sprintf strings,
but failed to remove the extra byte allocated for the '/'.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
No point calling the no-fail-alloc if you check for failure and your
only caller checks for failure.
No point calling calloc to zero fill memory you're about to memcpy over.
In the unlikely event of a loss of memory allocation, drop your previous
allocations before returning to others.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
sun_init.c: In function `xf86OpenConsole':
sun_init.c:99: warning: cast does not match function type
sun_init.c:74: warning: unused variable `FreeVTslot'
sun_init.c: In function `xf86UseMsg':
sun_init.c:417: warning: old-style parameter declaration
sun_vid.c: In function `solUnMapVidMem':
sun_vid.c:162: warning: long unsigned int format, pointer arg (arg 6)
sun_vid.c: In function `xf86ReadBIOS':
sun_vid.c:217: warning: long unsigned int format, pointer arg (arg 5)
sun_vid.c:217: warning: long unsigned int format, int arg (arg 6)
sun_agp.c: In function `xf86EnableAGP':
sun_agp.c:321: warning: unsigned int format, CARD32 arg (arg 4)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
static function only called from the matchDriverFromFiles function
that's inside #ifdef __linux__ section
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Most importantly removes AC_PROG_CC call that resets compiler flags back
to C89 mode, breaking use of C99 isfinite() on Solaris in dix/devices.c.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
LOOKUP_DRAWABLE & VERIFY_GC are no longer in dix.h, but
WriteReplyToClient & WriteSwappedDataToClient are.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
The function is defined as a static, so can't be called by anyone
but AddCallback.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Xalloc, Xrealloc, & Xfree are deprecated now
ALLOCATE_LOCAL is removed due to stack overflow issues
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
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>
Signed-off-by: Adam Jackson <ajax@redhat.com>
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>
The code has been gone for a while
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
According to Xserver-spec, they were part of the now-deleted DBE "Idioms"
code. The last callers of them were removed in commits fe616f9230 &
3d64290547.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Only one (marginal) driver was using it, and it's been fixed to just
implement it directly.
v2: Also fix sdksyms.sh (spotted by Jesse Adkins)
v3: Also fix DESIGN.xml (spotted bu Julien Cristau)
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Taken from:
50d2d8c896dbffd0d44a9b5b10216375f9b98af307fba8b1f7
With minor style fixes, ported to dixLookupResourceByType, and ported
away from client->noClientException and xalloc/xfree.
v2: Fix a memory leak in PanoramiXCompositeNameWindowPixmap, spotted by
James Jones.
v3: Fix a buglet in PanoramiXCompositeUnredirectSubwindows, spotted by
Dave Airlie.
v4: Fix a style issue with resource lookup noted by Jamey Sharp.
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Taken from:
583f4dde81
With minor style fixes and ported to dixLookupResourceByType.
Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>