Commit Graph

237 Commits

Author SHA1 Message Date
Boris-Barboris 16571b8926 Don't hardcode fps for fake screen
Currently, when main hardware screen is powered-off,
X server initializes fake screen's timer with
1 second update interval.

Streaming software like Nomachine or Vnc, as well as
desktop input automation suffers from it, since it
will forever be stuck on 1 fps until the display is
turned back on.

This commit adds command line option -fakescreenfps <int>
that allows the user to change the default fake screen
timer.

Signed-off-by: Baranin Alexander <ismailsiege@gmail.com>
2021-07-29 08:09:00 +00:00
Olivier Certner d4b38e1119 os: Properly report failure to link lock file
Stop assuming that a failure to link always means that the file indeed
exists. In case of other failure (e.g., permissions), the user would get an
inconsistent "Can't read lock file" message.

Signed-off-by: Olivier Certner <olce.freedesktop@certner.fr>
2021-06-25 10:18:18 +00:00
Olivier Fourdan 6b47321bc6 dix: Add optional terminate delay
When the command line option "-terminate" is used, it could be
interesting to give it an optional grace period to let the Xserver
running for a little longer in case a new connection occurs.

This adds an optional parameter to the "-terminate" command line option
for this purpose.

v2: Use a delay in seconds instead of milliseconds
    (Martin Peres <martin.peres@mupuf.org>)
v3: Clarify man page entry, ensure terminateDelay is always >= 0,
    simplify TimerFree(). (Peter Hutterer <peter.hutterer@who-t.net>)

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-06-07 17:28:05 +02:00
Olivier Fourdan 3cdac5ba07 mi: List extensions in usage message
Not all extensions can be enabled or disabled at runtime, list the
extensions which can from the help message rather than on error only.

v2:
 * Print the header message in the ListStaticExtensions() (Peter
   Hutterer)
 * Do not export ListStaticExtensions() as Xserver API

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2021-01-29 12:52:09 +00:00
Adam Jackson 2d1ed64d2a dix: Remove -to option to set the default connection timeout
One minute is admittedly arbitrary, but again, pretty sure this never
gets set on the command line in practice.
2019-10-30 16:17:04 +00:00
Adam Jackson 56ea4c769c dix: Remove -fn and -fc options to set default text/cursor fonts
I strongly suspect these never get used in the wild, and it's not an
especially useful thing to do in any case.
2019-10-30 16:17:04 +00:00
Jon Turney 7b4b030df8 configure: Check for sigprocmask
MinGW defines SIG_BLOCK, but doesn't have signal masks, so rather than
checking for SIG_BLOCK, add a configure check for sigprocmask.

v2:
Also add check to meson.build
2019-05-18 14:59:38 +00:00
Peter Harris 937a5b78a2 os: Fix GetTimeInMicros resolution
GetTimeInMillis is called first, which sets clockid to
CLOCK_MONOTONIC_COARSE, which is typically much lower resolution than
the callers of GetTimeInMicros want.

Prior to a779fda224, GetTimeInMillis and
GetTimeInMicros did not share a clockid.

Restore the clockid split to fix the granularity of GetTimeInMicros.

Signed-off-by: Peter Harris <pharris@opentext.com>
2019-01-30 14:56:46 -05:00
Adam Jackson 53d32c94f3 dix: Remove the magic WhenMapped backing store hack
Automatic compositing exists, if that's what you want then use it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-10-23 18:37:46 +00:00
Nicolai Hähnle 1b6910af12 os: use PrivsElevated instead of a manual check
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker@redhat.com>
2018-03-21 10:58:40 -04:00
Nicolai Hähnle 9ef602de46 os: move xf86PrivsElevated here
Having different types of code all trying to check for elevated privileges
is a bad idea. This implementation is the most thorough one.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-21 10:58:39 -04:00
Jeff Smith 510e7d0d86 os: Always return microseconds from GetTimeInMicros()
When a monotonic clock is not available, GetTimeInMicros() returns the
time in nanoseconds.  Instead, return the time in microseconds, as the
name indicates.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-01-31 16:02:39 -05:00
Adam Jackson aabf65d2a0 os: Fix warning in LockServer
The meson build gives me:

../os/utils.c: In function ‘LockServer’:
../os/utils.c:310:40: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
     snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid());
                                        ^~~~~~~~~
../os/utils.c:310:5: note: ‘snprintf’ output between 12 and 13 bytes into a destination of size 12
     snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid());
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Which seems to be due to the %d part meaning that a negative number's -
sign would be one wider than we're expecting. Fine, just coerce it to
unsigned.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-08-30 15:53:04 -04:00
Adam Jackson 152375f4e4 os, xfree86: Stop being so weird about <limits.h>
Whatever problem this is trying to fix, we don't care. Just include the
thing and stop worrying about whether _POSIX_SOURCE is defined.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-05-12 09:49:07 -04:00
Eric Anholt c7be7a688a Use #ifdef instead of #if for features to make Meson easier.
We mostly use #ifdef throughout the tree, and this lets the generated
config.h files just be #define TOKEN instead of #define TOKEN 1.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2017-04-26 17:30:12 -04:00
Michel Dänzer 27a6b9f7c8 os: Handle SIGABRT
Without this, assertion failures can make life hard for users and those
trying to help them.

v2:
* Change commit log wording slightly to "can make life hard", since
  apparently e.g. logind can alleviate that somewhat.
* Set default handler for SIGABRT in
  hw/xfree86/common/xf86Init.c:InstallSignalHandlers() and
  hw/xquartz/quartz.c:QuartzInitOutput() (Eric Anholt)

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2017-04-26 16:07:19 -04:00
Adam Jackson 3360418767 dpms: Consolidate a bunch of stuff into Xext/dpms.c
Most of this is a legacy of the old "extmod" design where you could load
_some_ extensions dynamically but only if the server had been built with
support for them in the first place.

Note that since we now only initialize the DPMS extension if at least
one screen supports it, we no longer need DPMSCapableFlag: if it would
be false, we would never read its value.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-27 15:59:47 -04:00
Keith Packard 8217c29d2d Allow 1024 and 2048 for LimitClients
There's no reason not to offer ridiculous numbers of clients; only a
few static data structures are arrays of this length.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-21 15:04:47 -04:00
Keith Packard e6636b4383 os: Compute timeout in milliseconds instead of struct timeval
The timeout resolution offered in the AdjustWaitForDelay call is
only milliseconds, so passing around the timeout as a pointer to a
struct timeval is not helpful. Doing everything in milliseconds up to
the point of the select call simplifies the code without affecting
functionality at all.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:27:51 -04:00
Keith Packard 05a793f5b3 dix: Switch to the libXfont2 API (v2)
This new libXfont API eliminates exposing internal X server symbols to
the font library, replacing those with a struct full of the entire API
needed to use that library.

v2: Use libXfont2 instead of libXfont_2

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:25:59 -04:00
Adam Jackson 6178b1c91c dix: Use OsSignal() not signal()
As the man page for the latter states:

    The effects of signal() in a multithreaded process are unspecified.

We already have an interface to call sigaction() instead, use it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2016-06-08 11:36:31 -04:00
Jonas Ådahl a779fda224 xwayland: Use the CLOCK_MONOTONIC clock
By default the X server will try CLOCK_MONOTONIC_COARSE before
CLOCK_MONOTONIC, while A Wayland compositor may only support getting
their timestamps from the CLOCK_MONOTONIC clock. This causes various
issues since it may happen that a timestamp from CLOCK_MONOTONIC
retrieved before a sending an X request will still be "later" than the
timestamp the X server than gets after receiving the request, due to the
fact that CLOCK_MONOTONIC_COARSE has a lower resolution.

To avoid these issues, make Xwayland always use CLOCK_MONOTONIC, so
that it becomes possible for Wayland compositor only supporting
CLOCK_MONOTONIC and X server to use the same clock.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-31 08:44:38 +10:00
Keith Packard 30ac756798 Create a threaded mechanism for input [v7]
The current SIGIO signal handler method, used at generation of input events,
has a bunch of oddities. This patch introduces an alternative way using a
thread, which is used to select() all input device file descriptors.

A mutex was used to control the access to input structures by the main and input
threads. Two pipes to emit alert events (such hotplug ones) and guarantee the
proper communication between them was also used.

Co-authored-by: Fernando Carrijo <fcarrijo@freedesktop.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>

v2: Fix non-Xorg link. Enable where supported by default.

    This also splits out the actual enabling of input threads to
    DDX-specific patches which follow

v3: Make the input lock recursive

v4: Use regular RECURSIVE_MUTEXes instead of rolling our own
    Respect the --disable-input-thread configuration option by
    providing stubs that expose the same API/ABI.

    Respond to style comments from Peter Hutterer.

v5: use __func__ in inputthread debug and error mesages.

    Respond to style comments from Peter Hutterer.

v6: use AX_PTHREAD instead of inlining pthread tests.

    Suggested by Emil Velikov <emil.l.velikov@gmail.com>

v7: Use pthread_sigmask instead of sigprocmask when using threads

    Suggested by Adam Jackson <ajax@redhat.com>

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-26 16:07:54 -07:00
Keith Packard 6a5a4e6037 Remove SIGIO support for input [v5]
This removes all of the SIGIO handling support used for input
throughout the X server, preparing the way for using threads for input
handling instead.

Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls
to stub functions input_lock/input_unlock so that we don't lose this
information.

xfree86 SIGIO support is reworked to use internal versions of
OsBlockSIGIO and OsReleaseSIGIO.

v2: Don't change locking order (Peter Hutterer)
v3: Comment weird && FALSE in xf86Helper.c
    Leave errno save/restore in xf86ReadInput
    Squash with stub adding patch (Peter Hutterer)
v4: Leave UseSIGIO config parameter so that
    existing config files don't break (Peter Hutterer)
v5: Split a couple of independent patch bits out
    of kinput.c (Peter Hutterer)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Adam Jackson b3e9c534e2 os: unifdef STREAMSCONN
Removed from xtrans in 2012, and never wired up in the modular build
anyway.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2016-02-08 21:49:56 -05:00
Keith Packard e10ba9e4b5 Remove non-smart scheduler. Don't require setitimer.
This allows the server to call GetTimeInMillis() after each request is
processed to avoid needing setitimer. -dumbSched now turns off the
setitimer.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-12-01 13:54:54 -05:00
Daniel Drake 1f915e8b52 Keep SIGALRM restart flag after Popen
Commit 94ab7455 added SA_RESTART to the SIGALRM handler.  However, the
Popen code tears down and recreates the SIGALRM handler via OsSignal(),
and this flag is dropped at this time.

Clean the code to use just a single codepath for creating this signal
handler, always applying SA_RESTART.

[ajax: Fixed commit id]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
2015-09-21 11:06:39 -04:00
Daniel Drake 94ab7455ab Allow system call restarts upon signal interruption
The X server frequently deals with SIGIO and SIGALRM interruptions.
If process execution is inside certain blocking system calls
when these signals arrive, e.g. with the kernel blocked on
a contended semaphore, the system calls will be interrupted.

Some system calls are automatically restartable (the kernel re-executes
them with the same parameters once the signal handler returns) but
only if the signal handler allows it.

Set SA_RESTART on the signal handlers to enable this convenient
behaviour.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
2015-09-21 10:41:46 -04:00
Olivier Fourdan d206c240c0 configurable maximum number of clients
Make the maximum number of clients user configurable, either from the command
line or from xorg.conf

This patch works by using the MAXCLIENTS (raised to 512) as the maximum
allowed number of clients, but allowing the actual limit to be set by the
user to a lower value (keeping the default of 256).

There is a limit size of 29 bits to be used to store both the client ID and
the X resources ID, so by reducing the number of clients allowed to connect to
the X server, the user can increase the number of X resources per client or
vice-versa.

Parts of this patch are based on a similar patch from Adam Jackson
<ajax@redhat.com>

This now requires at least xproto 7.0.28

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-24 00:00:18 -07:00
Adam Jackson b51f7f8582 dix: Unexport various implementation details
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:57 -04:00
Keith Packard 26e50e8b2c Merge remote-tracking branch 'jturney/mingw-build-fixes' 2015-05-11 15:36:53 -07:00
Colin Harrison c7b49bdbb9 os/utils.c: Fix prototype for Win32TempDir()
xorg/xserver/os/utils.c: In function ‘Win32TempDir’:
xorg/xserver/os/utils.c:1643:1: warning: old-style function definition [-Wold-style-definition]

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-04-22 12:55:32 +01:00
Colin Harrison a9b4b7b796 os/utils.c: Don't try to build os_move_fd() for WIN32
Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-04-22 12:55:29 +01:00
Alan Coopersmith df4e41fdb4 Convert os/* to new *allocarray functions
v2: remove now useless parentheses

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:08 -07:00
Alan Coopersmith ae75d50395 Add no-fail equivalents of allocarray & reallocarray
v2: Remove extra 's' from comment

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:08 -07:00
Alan Coopersmith b96dc99996 Add XNFcallocarray() to allow xnfcalloc() to check for overflow
The xnfcalloc() macro took two arguments but simply multiplied them
together without checking for overflow and defeating any overflow
checking that calloc() might have done.  Let's not do that.

The original XNFcalloc() function is left for now to preserve driver
ABI, but is marked as deprecated so it can be removed in a future round
of ABI break/cleanup.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:07 -07:00
Alan Coopersmith 16a32c53f6 If fork fails in System(), don't fallthrough to exec()
In the unlikely event of a failure in creating processes, signal
masks will fall from the panels above you.  Secure your mask before
telling your child what to do, since it won't exist, and you will
instead cause the server itself to be replaced by a shell running
the target program.

Found by Coverity #53397: Missing break in switch
Execution falls through to the next case statement or default;
 this might indicate a common typo.
In System: Missing break statement between cases in switch statement (CWE-484)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-23 17:32:14 -07:00
Keith Packard cc59be38b7 os: Don't listen to 'tcp' by default. Add '-listen' option. [v2]
This disables the tcp listen socket by default. Then, it
uses a new xtrans interface, TRANS(Listen), to provide a command line
option to re-enable those if desired.

v2: Leave unix socket enabled by default. Add configure options.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-22 13:52:20 -07:00
Jon TURNEY e3aa13b8d6 Update help text since -iglx is now the default
This should have been part of d0da0e9c3b

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-17 15:45:05 -07:00
Eric Anholt d0da0e9c3b glx: Disable indirect GLX contexts by default.
Almost every situation of someone running indirect GLX is a mistake
that results in X Server crashes.  Indirect GLX is the cause of
regular security vulnerabilities, and rarely provides any capability
to the user.  Just disable it unless someone wants to enable it for
their special use case (using +iglx on the command line).

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by:  Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11 18:24:03 -07:00
Adam Jackson cad9b053d5 os: Remove deprecated malloc/free wrappers
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:51:50 -04:00
Robert Ancell 2535b76c0d os: Add -displayfd into -help text
Add -displayfd into -help text. It was mentioned in the man page but seem to have been missed from the -help text.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-30 10:23:54 -07:00
Eric Anholt 99f0365b1f Add a command line argument for disabling indirect GLX.
The attack surface for indirect GLX is huge, and it's of no use to
most people (if you get an indirect GL context, you're better served
by a immediate X error than actually trying to use an indirect GL
context and finding out that it doesn't support doing anything you
want, slowly).  This flag gives you a chance to disable indirect GLX
in environments where you just don't need it.

I put in both the '+' and '-' arguments right now, so that it's easy
to patch the value to change the default policy.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-23 13:24:22 -07:00
Keith Packard 7abd286850 os: Make sure that writing our pid to the lock file actually worked
There's no sense verifying that we can create the lock file and then
ignoring the return value from write.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2014-04-18 16:30:17 -07:00
Jon TURNEY bc348bd2c4 Handle -displayfd and an explicit display number sensibly
Handle -displayfd and an explicit display number sensibly, e.g. use the
explicitly specified display number, and write it to the displayfd

v2: displayfd might be 0, so use -1 as invalid value
v3: Rebase for addition of NoListenAll flag

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-03-27 14:34:34 +00:00
Kristian Høgsberg 44fe1b8ea2 os: Add a mechanism to prevent creating any listen sockets
A socket-activated server will receive its listening sockets from the
parent process and should not create its own sockets.  This patch
introduces a NoListen flag that can be set by a DDX to prevent
the server from creating the sockets.  When NoListen is enabled, we
also disable the server lock checking, since the parent process is
responsible for checking the lock before picking the display name and
creating the sockets.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-03-20 09:23:16 +10:00
Peter Hutterer 675f215af2 Revert "os: xstrtokenize takes and returns const char * now"
This reverts commit d0339a5c66.

seriously, what the fuck? Are we making xstrdup() return a const char now too?

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-04 11:27:48 +10:00
Keith Packard 25ebb9dbc9 Merge remote-tracking branch 'whot/for-keith' 2014-01-22 11:33:53 -08:00
Peter Hutterer 71baa466b1 os: restrict display names to digits
We call atoi() on the server's display to get the socket but otherwise use the
unmodified display for log file name, xkb paths, etc. This results in
Xorg :banana being the equivalent of Xorg :0, except for the log files being
in /var/log/Xorg.banana.log. I'm not sure there's a good use-case for this
behaviour.

Check the display for something that looks reasonable, i.e. digits only, but
do allow for :0.0 (i.e. digits, followed by a period, followed by one or two
digits).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-01-15 08:09:47 +10:00
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08:00