Commit Graph

16959 Commits

Author SHA1 Message Date
Jon Turney
f0e22a76c9 travis: Add OSX meson build to matrix
Unfortunately, a 'brew update' is currently needed to get the meson >=
0.46.0 required by xserver.
2019-05-02 15:42:58 +00:00
Jon Turney
0bdfa5bc0a travis: Don't produce fat binaries on OSX
Trying to build fat binaries for multiple arches tickles a bug [1] in
the framework detector in meson 0.50.  Workaround this by not bothering
building for x86, which is probably no great loss :S

https://github.com/mesonbuild/meson/issues/5290
2019-05-02 15:42:58 +00:00
Jon Turney
655b1eb32e meson: Convert xquartz from autotools
Differences from autotools:

* Autotools defined NO_ALLOCA for OSX builds.  I don't think we need
this anymore as Xalloc.h is no longer used anywhere in the xserver.

* X11.bin is linked with -u,miDCInitialize, and then libserver_mi
provided to satisfy (just) that.  It's been that way since the commit
which added it.  We can't write the equivalent in meson due to linker
argument ordering issues, but do we really need to?

* An explicit -Dsecure-rpc=false is required for OSX, since in meson we
don't do the checks that XTRANS_SECURE_RPC_FLAGS did for the existence
of the specific RPC functions required.
2019-05-02 15:42:58 +00:00
Jon Turney
e5f4c7c80b xquartz: Fix a typo in man page substitution
The typo fixed in d69460159 was still present for this setting when
added in ac439842.

meson warns that there is no substitution with this name.
2019-05-02 15:42:58 +00:00
Jon Turney
ecf62b7ba6 meson: Build rootless extension 2019-05-02 15:42:58 +00:00
Jon Turney
b4ed20c4f1 Promote file containing date & time build was configured to top-level
Promote the generated file containing the date & time build was
configured to top-level.

Rename it from xf86Build.h to buildDateTIme.h.

Use it as well in XQuartz, stringize BUILD_DATE when needed.
2019-05-02 15:42:58 +00:00
Adam Richter
71cff63c06 hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck. 2019-05-01 15:22:15 -07:00
Adam Richter
b6eb8cf03f hw/xfree86/os-support/linux/lnx_agp.c xf86GetAGPInfo(): free(info) in an error path, caught by cppcheck. 2019-05-01 15:22:02 -07:00
Adam Richter
99904a3a7b hw/xwin/glx/indirect.c glxWinScreenProbe(): Add free(screen) that was missing from an error path. Caught by cppcheck. 2019-05-01 15:21:48 -07:00
Adam Jackson
007d812a83 glx: Fix GLX_CONTEXT_RELEASE_BEHAVIOR_ARB handling
None of this was getting compiled because we hadn't defined the macro
(and aren't getting them from <GL/glxext.h> because reasons). Fix that.

Fixes: xorg/xserver#684
2019-05-01 14:38:09 +00:00
Jon Turney
a2302de6fe hw/xwin: Remove mwextwm mode
This has always been described as 'experimental'

We don't think this has any users: This mode has been disabled in Cygwin
packages since March 2016. We've never provided the xwinwm WM for x86_64
Cygwin. No one has even asked where the option has gone.

This leaves XQuartz as the only user of the rootless extension.

Remove --enable-windowswm configure option
Remove multiwindowextwm stuff from Makefiles
Remove -mwextwm option
Remove -mwextwm from man-page and help
Un-ifdef XWIN_MULTIWINDOWEXTWM

v2:
Remove rootless include paths
Remove windowswmproto from meson.build
2019-05-01 14:06:15 +00:00
Jon Turney
504468d2cf meson: Don't use strndup() unless it's prototyped
A workaround for https://github.com/mesonbuild/meson/issues/3672

MinGW-w64 gcc has a built-in strndup, but it's not in the C library and
MinGW-w64 headers don't prototype it.

Don't try to use it, as that will cause an undefined reference if gcc
decides that an out-of-line call is appropriate.
2019-04-30 20:07:51 +00:00
Jon Turney
d3a528c91e Remove unneeded include of dix.h from strcasestr.c
In the meson build, functions to make up for the shortcomings of libc
are compiled into a separate library. We don't bother making the pixman
headers available (reasonably enough) to this compilation, but they are
required indirectly by dix.h.  Just remove this unneeded include.
2019-04-30 20:07:51 +00:00
Jon Turney
fd52110ec4 meson: Don't try to build tests on Windows
Most of these could be made to work, but would need to be ported off
using fork and poll...
2019-04-30 20:07:51 +00:00
Jon Turney
50b8670fdf meson: Require clock_gettime() as well for MONOTONIC_CLOCK
As configure.ac, require that clock_gettime() exists as well to use
MONOTONIC_CLOCK (MinGW provides the define, but not the function)
2019-04-30 20:07:51 +00:00
Jon Turney
92a52611f6 meson: Link with ws2_32 for socket functions on Windows 2019-04-30 20:07:51 +00:00
Jon Turney
d21224cd15 meson: Don't set UNIXCONN on Windows
As XTRANS_CONNECTION_FLAGS did, don't try to build unix socket support
on Windows.
2019-04-30 20:07:51 +00:00
Jon Turney
93a1cdcc78 meson: Fix hw/xwin for -Dglx=false
hw/xwin/meson.build:140:0: ERROR:  Unknown variable "xwin_windowsdri".
hw/xwin/meson.build:141:0: ERROR:  Unknown variable "xwin_glx".
2019-04-30 20:07:51 +00:00
Jon Turney
331850ce6f meson: Fix value of libglxvnd in -Dglx=false build
hw/vfb/meson.build:7:0: ERROR:  '' is not a target.
2019-04-30 20:07:51 +00:00
Jon Turney
c2feeca1b0 meson: Absence of dri.pc is an error if building with GLX
Currently, this can error if dri.pc isn't found, as we can't then get
the value of pkgconfig variable from it:

include/meson.build:199:10: ERROR:  'dri' is not a pkgconfig dependency

I think we need DRI_DRIVER_PATH (only) when building GLX, even if dri2/3
isn't enabled, so we know where to load swrast_dri.so from.

(For autotools, configure.ac directly calls `pkg-config
--variable=dridriverdir dri`, the backticks swallowing any error,
causing the value of this define to be empty if dri.pc isn't present)
2019-04-30 20:07:51 +00:00
Jon Turney
1f5742d271 meson: Fix building unit tests when protocol headers aren't in default include path 2019-04-29 11:49:46 +00:00
Jon Turney
f013979507 xquartz: Add stub ddxInputThread()
Omitted from 4ad21c32
2019-04-28 22:38:51 +00:00
Fabrice Fontaine
836f93de99 hw/xwayland/Makefile.am: fix build without glx
Commit d8ec33fe05 added libglxvnd.la to
Xwayland_LDFLAGS but GLX can be disabled through --disable-glx.
In this case, build fails on:

make[3]: *** No rule to make target '../../glx/libglxvnd.la', needed by 'Xwayland'.  Stop.
make[3]: *** Waiting for unfinished jobs....

Fixes:
 - http://autobuild.buildroot.org/results/397f8098c57fc6c88aa12dc8d35ebb1b933d52ef

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-04-23 22:17:41 +00:00
Diego Viola
0854732d55 ephyr: fix typo: rquires -> requires
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2019-04-19 22:13:46 -03:00
Jon Turney
9c7ebf259f appveyor: Use ccache
Reduces i686 cygwin no-change build time from ~7 minutes to ~2.5 minutes
2019-04-18 13:58:11 +01:00
Jon Turney
16d8513759 appveyor: Drop cleaning of packaged libtool .la files
Not needed as meson doesn't use libtool.  I think they've all been
rebuilt now, in any case...
2019-04-18 13:27:50 +01:00
Jon Turney
f3e6002d79 appveyor: Drop trying to preserve build artefacts
We stopped staging them in 1519475a, so this did nothing.
2019-04-18 13:04:22 +01:00
Jon Turney
883530835d appveyor: Drop installing unnecessary packages
Drop installing packages which were used by the autotools build (or
maybe even monolithic build!) but are no longer required by the meson
build

Also, alphabetically sort within tools, protocol headers, devel
libraries, miscellaneous groups to match [1]

[1] https://x.cygwin.com/docs/cg/prog-build-prerequisites.html

Also, update to require xkbcomp-devel, split from xkbcomp
2019-04-18 12:24:36 +01:00
Jon Turney
6370cf026a appveyor: Reformat an absurdly long line in .appveyor.yml
Using YAML line-folding doesn't seem possible, as setup doesn't tolerate
spaces between package names, so instead drop some unneeded double quotes,
double quote the whole thing and escape newlines
2019-04-18 12:22:29 +01:00
Alex Goins
7f962c70b6 xsync: Add resource inside of SyncCreate, export SyncCreate
As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may
want to create a fence, then initialize it in their own way. This currently
can't be done without adding a function directly to Xext/sync.c due to the fact
that the RTFence resource type is private and there is no external interface to
add to it.

To facilitate other X extensions creating fences and initializing them, this
change exports SyncCreate() and adds the resource directly within it. Callers no
longer need to call AddResource() after SyncCreate(), they only need to
initialize the SyncObject.

To prevent FreeFence() and FreeCounter() from segfaulting if the call to
AddResource() fails before the sync object is initialized, this adds a new
'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and
FreeCounter() to skip de-initialization and simply free the object.
Initialization after adding the resource shouldn't otherwise be a problem due to
the single-threaded nature of X.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2019-04-17 14:01:17 -07:00
Eric Anholt
8702c938b3 glamor: Introduce a central place for our pixmap format/type handling.
We had various helper functions trying to come up with the
internalformat/format/type/render formats for pixmaps, and it's much
nicer to just detect what those should be once at startup.  This gives
us a chance to do the right thing for GLES.

It also, notably, fixes our format/type for depth 15 and 16 setup for
desktop GL, so that we actually allocate 16bpp (GL_RGB/565) on most
drivers instead of 32bpp (GL_RGB/UBYTE).

GLES still has regressions over desktop (2 regressions in llvmpipe
XTS, many in rendercheck), but I think this is a good baseline.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-17 19:34:48 +00:00
Eric Anholt
c94da112a7 glamor: Plumb the pixmap through fbo creation instead of a "format"
For GLES, we're going to need a lot more logic for picking the
iformat/format/type of texture setup, so we'll want the pixmap's depth
and is_cbcr flag.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-17 19:34:48 +00:00
Eric Anholt
34485be256 glamor: Stop trying to store the pixmap's "format" in glamor_pixmap_fbo.
"format" is a bit of a confused term (internalformat vs GL format),
and all we really needed was "is this GL_RED?"

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-17 19:34:48 +00:00
Eric Anholt
1b2e224d7d glamor: Switch the gl_flavor to a boolean is_gles.
There are only 2 flavors we are distinguishing -- GL versions are
handled separately.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-17 19:34:48 +00:00
Jon Turney
2764128e9f Fix missing prototype warning for xf86_find_platform_device_by_devnum()
../hw/kdrive/src/kdrive.c:999:1: warning: no previous prototype for ‘xf86_find_platform_device_by_devnum’ [-Wmissing-prototypes]

Place the same guards around this stub as are around including the
hotplug.h header which declares the prototype.
2019-04-17 13:57:38 +01:00
Jon Turney
ba59427aba Fix maybe-uninitialized warning in xf86NewInputDevice()
If SYSTEMD_LOGIND is not defined, systemd_logind_take_fd is defined as a
macro evaluating to -1 by systemd-logind.h, leaving paused
uninitialized.

../hw/xfree86/common/xf86Xinput.c: In function ‘xf86NewInputDevice’:
../hw/xfree86/common/xf86Xinput.c:919:16: warning: ‘paused’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../hw/xfree86/common/xf86Xinput.c:877:10: note: ‘paused’ was declared here
2019-04-17 13:57:38 +01:00
Jon Turney
7c266cafed Fix old-style definition warning for xf86OSInputThreadInit()
../hw/xfree86/os-support/stub/stub_init.c: In function ‘xf86OSInputThreadInit’:
../hw/xfree86/os-support/stub/stub_init.c:29:1: warning: old-style function definition [-Wold-style-definition]
2019-04-17 13:57:20 +01:00
Adam Jackson
6975807945 dix: Remove WindowRec::backStorage
This is only being set, never read.
2019-04-12 21:53:03 +00:00
Adam Jackson
0f477cc68b dix, composite: Optimize setting window backing store state
We hide CWBackingStore from the screen hook if nothing's actually
changing, which means compChangeWindowAttributes no longer needs to
compare the requested state with the present one.
2019-04-12 21:53:03 +00:00
Adam Jackson
4e101e7e3b mi: Simplify a conditional in miHandleExposures
miHandleExposures does two things: computes the region for which to
generate expose events, and (if the destination is a window) paints the
exposed regions with the background. The bit of this conditional we're
deleting here asserts that the source is either a pixmap or a window
without backing store. The only other possibility is a window _with_
backing store. In the old backing store implementation, this was where
you would recover bits from backing store. Since our "backing store" is
the redirected window pixmap, we know we've already copied all we could,
because CopyArea had already seen the entire window pixmap. So now in
that third case, we are still drawing to a pixmap (so there's no
background to paint) and we are still not generating events, so we can
exit early.

The comment above the function about recovering bits from backing store
is clearly misleading, so delete that too.
2019-04-12 21:53:03 +00:00
Aaron Plattner
147ed28bbf xfree86: Export xf86GPUScreens and xf86NumGPUScreens
Drivers may need to loop over the allocated screens during PreInit, for example
to consolidate xorg.conf options that apply to a GPU device as a whole.
Currently, this works for protocol screens becuase x86Screens is exported, but
does not work for GPU screens.

Export xf86GPUScreens and xf86NumGPUScreens for consistency with xf86Screens and
xf86NumScreens.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2019-04-12 21:45:19 +00:00
Eric Anholt
0a005c4fe4 test: Fix meson build with xvfb disabled.
Fixes #678

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-04 16:26:40 -07:00
Dave Airlie
8ab80fd505 xf86: set status to connected for monitors enabled in conf
If the user sets Option "Enable" "TRUE" for a monitor, the X
server will connect the connector a crtc but tell the user it
is disconnected.

However the user in this case is mutter, when it gets it's view
of the output configuration it sees the output is disconnected
and never sets it up again, which seems like the right thing to do.

If we let the user enable a monitor, lets just set it as always
connected.

Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2019-04-02 19:20:07 +00:00
Jon Turney
f1790339d0 tests: Always separate rendercheck -f and -o options with a space 2019-04-02 13:12:42 +01:00
Michel Dänzer
fee147d75e gitlab-ci: Retry jobs after runner system failures
Up to twice, for a total of 3 attempts maximum.

This will hopefully avoid spurious CI pipeline failures due to
intermittent GitLab/docker infrastructure issues.

Inspired by
6140ed3d2c

Reviewed-by: Eric Anholt <eric@anholt.net>
2019-04-01 16:38:04 +02:00
Michel Dänzer
b5ef99f26a gitlab-ci: Simplify autotools job script
Drop the verbose test log output, matching the meson job script.

Reviewed-by: Eric Anholt <eric@anholt.net>
2019-04-01 16:37:27 +02:00
Michel Dänzer
35561d4d1e gitlab-ci: Simplify meson job script
This way, the second ninja command line will be visible again as well in
the job output.

Reviewed-by: Eric Anholt <eric@anholt.net>
2019-04-01 16:36:51 +02:00
Roman Gilg
4adda1f635 present: Call present_vblank_scrap in screen mode
This cleans up some code duplication. No functional change.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2019-03-29 10:55:31 +01:00
Peter Hutterer
d7b1753d44 dix: leave last.valuators alone on slave switch
Terms:
dev->last.valuator[] is the last value given to us by the driver
dev->valuator.axisVal[] is the last value sent to the client
dev->last.scroll[] is the abs value of the scroll axis as given by the driver,
        used for button emulation calculation (and the remainder)

This function updates the device's last.valuator state based on the current
master axis state. This way, relative motion continues fluidly when switching
between devices. Before mouse 2 comes into effect, it's valuator state is
updated to wherever the pointer currently is so the relative event applies on
top of that.

This can only work for x/y axes, all other axes aren't guaranteed to have the
same meaning and/or may not be present:
- xtest device: no valuator 2
- mouse: valuator 2 is horizontal scroll axis
- tablet: valuator 2 is pressure

Scaling the current value from the pressure range into the range for
horizontal scrolling makes no sense. And it causes scroll jumps:

- scroll down, last.valuator == axisVal == 20
- xdotool click 1, the XTest device doesn't have that valuator
- scroll up
  - updateSlaveDeviceCoords reset last.valuator to 0 (axisVal == 20)
  - DeviceClassesChangedEvent includes value 20 for the axis
  - event is processed, last.value changes from 0 to -1
  - axisVal is updated to -1, causing a jump of -21

The same applies when we switch from tablet to mouse wheel if the pressure
value is 0 on proximity out (basically guaranteed). So let's drop this code
altogether and only leave the scaling for the relative x/y motion.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-29 03:44:29 +00:00
Eric Anholt
3b26b90cb7 glamor: Fix a compiler warning since the recent OOM fixes.
Signed-off-by: Eric Anholt <eric@anholt.net>
2019-03-28 13:55:22 -07:00