summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2019-03-14 20:34:41 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2019-03-14 20:34:41 +0000
commit25bc91dec58033ae35d03bd5317cf1c538efef77 (patch)
tree23002aefaf5d0a6343fdb38b0eeddbf6880fcfef
parent7396093f32a1bac6ccbb9114686897e6ef40f457 (diff)
parent94f036d412f4f426abe950b57b9ec99b78068c39 (diff)
Merge tag 'xorg-server-1.20.4' into cygwin-release-1.20
xorg-server-1.20.4
-rw-r--r--.gitlab-ci.yml115
-rw-r--r--.gitlab-ci/Dockerfile35
-rw-r--r--.travis.yml15
-rw-r--r--Makefile.am2
-rw-r--r--README.md (renamed from README)21
-rw-r--r--Xi/xibarriers.c10
-rw-r--r--configure.ac6
-rw-r--r--dri3/dri3_request.c4
-rw-r--r--glamor/glamor_render.c25
-rw-r--r--glx/vndcmds.c4
-rw-r--r--hw/xfree86/common/xf86pciBus.c2
-rw-r--r--hw/xfree86/dri2/pci_ids/i965_pci_ids.h1
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c12
-rw-r--r--hw/xfree86/modes/xf86RandR12.c2
-rw-r--r--hw/xquartz/mach-startup/Makefile.am4
-rw-r--r--hw/xwayland/xwayland-glamor-gbm.c6
-rw-r--r--hw/xwayland/xwayland-present.c163
-rw-r--r--hw/xwayland/xwayland.c22
-rw-r--r--hw/xwayland/xwayland.h6
-rw-r--r--hw/xwin/glx/Makefile.am3
-rw-r--r--include/Makefile.am3
-rw-r--r--include/xserver_poll.h2
-rw-r--r--meson.build2
-rw-r--r--mi/miinitext.c2
-rw-r--r--os/auth.c9
-rw-r--r--os/utils.c9
-rw-r--r--present/present.c2
-rw-r--r--present/present_priv.h1
-rw-r--r--present/present_scmd.c21
-rw-r--r--present/present_vblank.c6
-rw-r--r--present/present_wnmd.c20
-rwxr-xr-xtest/scripts/build-travis-deps.sh31
-rwxr-xr-xtest/scripts/run-piglit.sh6
-rwxr-xr-xtest/scripts/xinit-piglit-session.sh11
-rw-r--r--test/tetexec.cfg497
-rw-r--r--test/xi2/protocol-common.c1
-rw-r--r--test/xtest.c11
37 files changed, 374 insertions, 718 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d66bb0b62..4cb5e7d33 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,13 +1,108 @@
-image: docker:latest
-services:
- - docker:dind
+# IMAGE_TAG is the tag of the docker image used for the build jobs. If the
+# image doesn't exist yet, the docker-image stage generates it.
+#
+# In order to generate a new image, one should generally change the tag.
+# While removing the image from the registry would also work, that's not
+# recommended except for ephemeral images during development: Replacing an
+# image after a significant amount of time might pull in newer versions of
+# gcc/clang or other packages, which might break the build with older commits
+# using the same tag.
+#
+# After merging a change resulting in generating a new image to the main
+# repository, it's recommended to remove the image from the source repository's
+# container registry, so that the image from the main repository's registry
+# will be used there as well.
+variables:
+ IMAGE_TAG: "debian-testing-20190219"
+ IMAGE_LOCAL: "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
+ IMAGE_MAIN: "registry.freedesktop.org/xorg/xserver:$IMAGE_TAG"
-before_script:
- - echo FROM nwnk/xserver-travis-rawhide:v5 > Dockerfile
- - echo ADD . /root >> Dockerfile
- - echo WORKDIR /root >> Dockerfile
- - docker build -t withgit .
+stages:
+ - docker-image
+ - build-and-test
-job:
+debian-testing:
+ stage: docker-image
+ only:
+ changes:
+ - .gitlab-ci.yml
+ - .gitlab-ci/Dockerfile
+ image:
+ name: gcr.io/kaniko-project/executor:debug
+ entrypoint: [""]
script:
- - docker run --volume $HOME/.ccache:/root/.ccache withgit ./test/scripts/build-travis-deps.sh
+ - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
+ - mkdir kaniko-context
+ - |
+ echo "FROM $IMAGE_LOCAL" > kaniko-context/Dockerfile
+ # If the image exists in the local registry, skip to the build-and-test job
+ set +e
+ set -x
+ /kaniko/executor --context kaniko-context --no-push && exit 0
+ set +x
+ set -e
+ - |
+ echo "FROM $IMAGE_MAIN" > kaniko-context/Dockerfile
+ # Try to re-use the image from the main repository's registry, and if
+ # that fails, generate a local image from scratch
+ set +e
+ set -x
+ /kaniko/executor --context kaniko-context --destination $IMAGE_LOCAL && exit 0
+ set +x
+ set -e
+ - /kaniko/executor --context $CI_PROJECT_DIR/.gitlab-ci --destination $IMAGE_LOCAL
+
+.common-build-and-test:
+ stage: build-and-test
+ image: $IMAGE_LOCAL
+ artifacts:
+ when: on_failure
+ paths:
+ - build/test/piglit-results/
+ cache:
+ paths:
+ - ccache/
+ variables:
+ LC_ALL: C.UTF-8
+ before_script:
+ - export CCACHE_BASEDIR="$PWD"
+ - export CCACHE_DIR="$PWD/ccache"
+ - export CCACHE_COMPILERCHECK=content
+ - export PATH="/usr/lib/ccache:$PATH"
+ - ccache --zero-stats
+ - ccache --show-stats
+ after_script:
+ - CCACHE_DIR="$PWD/ccache" ccache --show-stats
+
+autotools-build-and-test:
+ extends: .common-build-and-test
+ script:
+ - mkdir build/
+ - cd build/
+ - ../autogen.sh --prefix=/usr
+ - make -j$(nproc) distcheck
+ - |
+ export PIGLIT_DIR=/root/piglit XTEST_DIR=/root/xts
+ set +e
+ set -x
+ make -j$(nproc) check
+ status=$?
+ cat test/piglit-results/xvfb/long-summary || :
+ exit $status
+
+meson-build-and-test:
+ extends: .common-build-and-test
+ variables:
+ PIGLIT_DIR: /root/piglit
+ XTEST_DIR: /root/xts
+ script:
+ - meson -Dprefix=/usr build/
+ - |
+ ninja -C build/ install
+ set +e
+ set -x
+ ninja -C build/ test
+ status=$?
+ cat build/meson-logs/testlog.txt
+ cat build/test/piglit-results/xvfb/long-summary || :
+ exit $status
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
new file mode 100644
index 000000000..4c66ad0d4
--- /dev/null
+++ b/.gitlab-ci/Dockerfile
@@ -0,0 +1,35 @@
+FROM debian:testing-slim
+
+WORKDIR /tmp
+
+RUN export DEBIAN_FRONTEND=noninteractive; \
+ echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
+ echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
+ echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
+ echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf && \
+ echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \
+ echo 'exit 101' >> /usr/sbin/policy-rc.d && \
+ chmod +x /usr/sbin/policy-rc.d && \
+ echo 'deb-src https://deb.debian.org/debian testing main' >/etc/apt/sources.list.d/deb-src.list && \
+ apt-get update && \
+ apt-get install -y meson git ca-certificates ccache cmake automake autoconf libtool libwaffle-dev \
+ libxkbcommon-dev python3-mako python3-numpy python3-six x11-utils x11-xserver-utils xauth xvfb && \
+ apt-get build-dep -y xorg-server && \
+ \
+ cd /root && \
+ git clone https://gitlab.freedesktop.org/mesa/piglit.git && cd piglit && \
+ cmake -G Ninja -DPIGLIT_BUILD_GL_TESTS=OFF -DPIGLIT_BUILD_GLES1_TESTS=OFF \
+ -DPIGLIT_BUILD_GLES2_TESTS=OFF -DPIGLIT_BUILD_GLES3_TESTS=OFF \
+ -DPIGLIT_BUILD_DMA_BUF_TESTS=OFF -DPIGLIT_BUILD_GLX_TESTS=OFF && \
+ ninja && \
+ cd .. && \
+ git clone https://gitlab.freedesktop.org/xorg/test/xts && \
+ cd xts && ./autogen.sh && xvfb-run make -j$(nproc) && \
+ cd .. && rm -rf piglit/.git xts/.git && \
+ echo '[xts]' > piglit/piglit.conf && echo 'path=/root/xts' >> piglit/piglit.conf && \
+ find -name \*.a -o -name \*.o | xargs rm && \
+ \
+ apt-get purge -y git cmake libwaffle-dev libxkbcommon-dev \
+ x11-utils x11-xserver-utils xauth xvfb && \
+ apt-get autoremove -y --purge && apt-get clean && \
+ rm -f /var/lib/apt/lists/deb.debian.org_debian_dists_testing_*
diff --git a/.travis.yml b/.travis.yml
index 5fbb29b68..15677891b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,24 +6,13 @@ branches:
matrix:
include:
- - os: linux
- dist: trusty
- services: docker
- env: DISTRO=rawhide:v5
- os: osx
osx_image: xcode9.2
env: DISTRO=xcode9.2
install:
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache ; fi
-
-before_script:
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull nwnk/xserver-travis-$DISTRO ; fi
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM nwnk/xserver-travis-$DISTRO > Dockerfile ; fi
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi
+ - HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
script:
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --volume $HOME/.ccache:/root/.ccache withgit /bin/sh -c "cd /root && ./test/scripts/build-travis-deps.sh" ; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./test/scripts/build-travis-osx.sh ; fi
+ - ./test/scripts/build-travis-osx.sh
- ccache -s
diff --git a/Makefile.am b/Makefile.am
index 32d4d21e7..19511f765 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,7 +72,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-server.pc
endif
-EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh
+EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh README.md
DISTCHECK_CONFIGURE_FLAGS=\
--with-xkb-path=$(XKB_BASE_DIRECTORY) \
diff --git a/README b/README.md
index 529526d18..bc39f41cd 100644
--- a/README
+++ b/README.md
@@ -1,4 +1,5 @@
- X Server
+X Server
+--------
The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
@@ -16,29 +17,19 @@ https://en.wikipedia.org/wiki/X_server
All questions regarding this software should be directed at the
Xorg mailing list:
- https://lists.freedesktop.org/mailman/listinfo/xorg
-
-Please submit bug reports to the Xorg bugzilla:
-
- https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+ https://lists.freedesktop.org/mailman/listinfo/xorg
The master development code repository can be found at:
- git://anongit.freedesktop.org/git/xorg/xserver
-
- https://cgit.freedesktop.org/xorg/xserver
+ https://gitlab.freedesktop.org/xorg/xserver
For patch submission instructions, see:
- https://www.x.org/wiki/Development/Documentation/SubmittingPatches
-
-For more information on the git code manager, see:
-
- https://wiki.x.org/wiki/GitPage
+ https://www.x.org/wiki/Development/Documentation/SubmittingPatches
As with other projects hosted on freedesktop.org, X.Org follows its
Code of Conduct, based on the Contributor Covenant. Please conduct
yourself in a respectful and civilized manner when using the above
mailing lists, bug trackers, etc:
- https://www.freedesktop.org/wiki/CodeOfConduct
+ https://www.freedesktop.org/wiki/CodeOfConduct
diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
index d0be70135..1926762ad 100644
--- a/Xi/xibarriers.c
+++ b/Xi/xibarriers.c
@@ -611,7 +611,9 @@ CreatePointerBarrierClient(ClientPtr client,
}
pbd->deviceid = dev->id;
+ input_lock();
xorg_list_add(&pbd->entry, &ret->per_device);
+ input_unlock();
}
ret->id = stuff->barrier;
@@ -626,7 +628,9 @@ CreatePointerBarrierClient(ClientPtr client,
ret->barrier.directions &= ~(BarrierPositiveX | BarrierNegativeX);
if (barrier_is_vertical(&ret->barrier))
ret->barrier.directions &= ~(BarrierPositiveY | BarrierNegativeY);
+ input_lock();
xorg_list_add(&ret->entry, &cs->barriers);
+ input_unlock();
*client_out = ret;
return Success;
@@ -689,7 +693,9 @@ BarrierFreeBarrier(void *data, XID id)
mieqEnqueue(dev, (InternalEvent *) &ev);
}
+ input_lock();
xorg_list_del(&c->entry);
+ input_unlock();
FreePointerBarrierClient(c);
return Success;
@@ -709,7 +715,9 @@ static void add_master_func(void *res, XID id, void *devid)
pbd = AllocBarrierDevice();
pbd->deviceid = *deviceid;
+ input_lock();
xorg_list_add(&pbd->entry, &barrier->per_device);
+ input_unlock();
}
static void remove_master_func(void *res, XID id, void *devid)
@@ -752,7 +760,9 @@ static void remove_master_func(void *res, XID id, void *devid)
mieqEnqueue(dev, (InternalEvent *) &ev);
}
+ input_lock();
xorg_list_del(&pbd->entry);
+ input_unlock();
free(pbd);
}
diff --git a/configure.ac b/configure.ac
index a1b476e04..ebcee0bd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,9 +26,9 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.20.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2018-10-25"
-RELEASE_NAME="Harissa Roasted Carrots"
+AC_INIT([xorg-server], 1.20.4, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
+RELEASE_DATE="2019-02-25"
+RELEASE_NAME="Chestnut Tortelloni"
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index e34bebedb..958877efa 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -135,7 +135,7 @@ proc_dri3_open(ClientPtr client)
REQUEST_SIZE_MATCH(xDRI3OpenReq);
- status = dixLookupDrawable(&drawable, stuff->drawable, client, 0, DixReadAccess);
+ status = dixLookupDrawable(&drawable, stuff->drawable, client, 0, DixGetAttrAccess);
if (status != Success)
return status;
@@ -365,7 +365,7 @@ proc_dri3_get_supported_modifiers(ClientPtr client)
REQUEST_SIZE_MATCH(xDRI3GetSupportedModifiersReq);
- status = dixLookupWindow(&window, stuff->window, client, DixReadAccess);
+ status = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess);
if (status != Success)
return status;
pScreen = window->drawable.pScreen;
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index 0417df4e6..d5737018f 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -766,18 +766,27 @@ glamor_set_normalize_tcoords_generic(PixmapPtr pixmap,
*
* We could support many more formats by using GL_ARB_texture_view to
* parse the same bits as different formats. For now, we only support
- * tweaking whether we sample the alpha bits of an a8r8g8b8, or just
- * force them to 1.
+ * tweaking whether we sample the alpha bits, or just force them to 1.
*/
static Bool
-glamor_render_format_is_supported(PictFormatShort format)
+glamor_render_format_is_supported(PicturePtr picture)
{
- switch (format) {
+ PictFormatShort storage_format;
+
+ /* Source-only pictures should always work */
+ if (!picture->pDrawable)
+ return TRUE;
+
+ storage_format = format_for_depth(picture->pDrawable->depth);
+
+ switch (picture->format) {
case PICT_x2r10g10b10:
+ return storage_format == PICT_x2r10g10b10;
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
+ return storage_format == PICT_a8r8g8b8 || storage_format == PICT_x8r8g8b8;
case PICT_a8:
- return TRUE;
+ return storage_format == PICT_a8;
default:
return FALSE;
}
@@ -815,7 +824,7 @@ glamor_composite_choose_shader(CARD8 op,
goto fail;
}
- if (!glamor_render_format_is_supported(dest->format)) {
+ if (!glamor_render_format_is_supported(dest)) {
glamor_fallback("Unsupported dest picture format.\n");
goto fail;
}
@@ -978,7 +987,7 @@ glamor_composite_choose_shader(CARD8 op,
goto fail;
}
} else {
- if (source && !glamor_render_format_is_supported(source->format)) {
+ if (source && !glamor_render_format_is_supported(source)) {
glamor_fallback("Unsupported source picture format.\n");
goto fail;
}
@@ -990,7 +999,7 @@ glamor_composite_choose_shader(CARD8 op,
goto fail;
}
} else if (mask) {
- if (!glamor_render_format_is_supported(mask->format)) {
+ if (!glamor_render_format_is_supported(mask)) {
glamor_fallback("Unsupported mask picture format.\n");
goto fail;
}
diff --git a/glx/vndcmds.c b/glx/vndcmds.c
index 45b1eafaa..f0779d14a 100644
--- a/glx/vndcmds.c
+++ b/glx/vndcmds.c
@@ -386,10 +386,6 @@ static int dispatch_GLXVendorPriv(ClientPtr client)
// Note that even if none of the vendors provides a dispatch stub,
// we'll still add an entry to the dispatch table, so that we don't
// have to look it up again later.
- disp = (GlxVendorPrivDispatch *) malloc(sizeof(GlxVendorPrivDispatch));
- if (disp == NULL) {
- return BadAlloc;
- }
disp->proc = GetVendorDispatchFunc(stuff->glxCode,
GlxCheckSwap(client,
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 0718cdcb0..6575c4ec8 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1190,7 +1190,7 @@ xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md)
{
int idx = 0;
-#ifdef __linux__
+#if defined(__linux__) || defined(__NetBSD__)
driverList[idx++] = "nouveau";
#endif
driverList[idx++] = "nv";
diff --git a/hw/xfree86/dri2/pci_ids/i965_pci_ids.h b/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
index 82e4a549e..1ef1a0edf 100644
--- a/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
+++ b/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
@@ -174,6 +174,7 @@ CHIPSET(0x3EA4, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)")
CHIPSET(0x3E91, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
CHIPSET(0x3E92, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
CHIPSET(0x3E96, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
+CHIPSET(0x3E98, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
CHIPSET(0x3E9A, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
CHIPSET(0x3E9B, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
CHIPSET(0x3E94, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 9717d9d39..336f7686e 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1354,13 +1354,19 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
{
modesettingPtr ms = modesettingPTR(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
/* XXX Check if DPMS mode is already the right one */
drmmode_crtc->dpms_mode = mode;
- if (ms->atomic_modeset && mode != DPMSModeOn && !ms->pending_modeset)
- drmmode_crtc_disable(crtc);
+ if (ms->atomic_modeset) {
+ if (mode != DPMSModeOn && !ms->pending_modeset)
+ drmmode_crtc_disable(crtc);
+ } else if (crtc->enabled == FALSE) {
+ drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+ 0, 0, 0, NULL, 0, NULL);
+ }
}
#ifdef GLAMOR_HAS_GBM
@@ -2834,7 +2840,7 @@ static int parse_path_blob(drmModePropertyBlobPtr path_blob, int *conn_base_id,
if (len + 1> 5)
return -1;
memcpy(conn_id, blob_data + 4, len);
- conn_id[len + 1] = '\0';
+ conn_id[len] = '\0';
id = strtoul(conn_id, NULL, 10);
*conn_base_id = id;
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index b49d4c789..34f2652bf 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -2019,7 +2019,7 @@ xf86RandR12ChangeGamma(ScrnInfoPtr pScrn, Gamma gamma)
RRCrtcPtr randr_crtc = xf86CompatRRCrtc(pScrn);
int size;
- if (!randr_crtc)
+ if (!randr_crtc || pScrn->LoadPalette == xf86RandR12LoadPalette)
return Success;
size = max(0, randr_crtc->gammaSize);
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index a0f9e9fe4..b2c446af8 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -76,6 +76,8 @@ nodist_Xquartz_SOURCES = \
Xquartz_LDFLAGS = \
-Wl,-framework,CoreServices
+if XQUARTZ
+
BUILT_SOURCES = \
mach_startupServer.c \
mach_startupUser.c \
@@ -88,6 +90,8 @@ CLEANFILES = \
$(BUILT_SOURCES): $(srcdir)/mach_startup.defs
mig -sheader mach_startupServer.h $(srcdir)/mach_startup.defs
+endif
+
EXTRA_DIST = \
launchd_fd.h \
mach_startup.defs \
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 6aa1e4641..5f8a68fd8 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -244,6 +244,9 @@ xwl_glamor_gbm_get_wl_buffer_for_pixmap(PixmapPtr pixmap,
uint64_t modifier;
int i;
+ if (xwl_pixmap == NULL)
+ return NULL;
+
if (xwl_pixmap->buffer) {
/* Buffer already exists. Return it and inform caller if interested. */
if (created)
@@ -494,6 +497,9 @@ glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
xwl_pixmap = xwl_pixmap_get(pixmap);
+ if (xwl_pixmap == NULL)
+ return 0;
+
if (!xwl_pixmap->bo)
return 0;
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index 316e04443..74fe84672 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -85,28 +85,23 @@ xwl_present_timer_callback(OsTimerPtr timer,
static inline Bool
xwl_present_has_events(struct xwl_present_window *xwl_present_window)
{
- return !xorg_list_is_empty(&xwl_present_window->event_list) ||
- !xorg_list_is_empty(&xwl_present_window->release_queue);
-}
-
-static inline Bool
-xwl_present_is_flipping(WindowPtr window, struct xwl_window *xwl_window)
-{
- return xwl_window && xwl_window->present_window == window;
+ return !!xwl_present_window->sync_flip ||
+ !xorg_list_is_empty(&xwl_present_window->event_list);
}
static void
xwl_present_reset_timer(struct xwl_present_window *xwl_present_window)
{
if (xwl_present_has_events(xwl_present_window)) {
- WindowPtr present_window = xwl_present_window->window;
- Bool is_flipping = xwl_present_is_flipping(present_window,
- xwl_window_from_window(present_window));
+ CARD32 timeout;
+
+ if (xwl_present_window->frame_callback)
+ timeout = TIMER_LEN_FLIP;
+ else
+ timeout = TIMER_LEN_COPY;
xwl_present_window->frame_timer = TimerSet(xwl_present_window->frame_timer,
- 0,
- is_flipping ? TIMER_LEN_FLIP :
- TIMER_LEN_COPY,
+ 0, timeout,
&xwl_present_timer_callback,
xwl_present_window);
} else {
@@ -117,16 +112,12 @@ xwl_present_reset_timer(struct xwl_present_window *xwl_present_window)
void
xwl_present_cleanup(WindowPtr window)
{
- struct xwl_window *xwl_window = xwl_window_from_window(window);
struct xwl_present_window *xwl_present_window = xwl_present_window_priv(window);
struct xwl_present_event *event, *tmp;
if (!xwl_present_window)
return;
- if (xwl_window && xwl_window->present_window == window)
- xwl_window->present_window = NULL;
-
if (xwl_present_window->frame_callback) {
wl_callback_destroy(xwl_present_window->frame_callback);
xwl_present_window->frame_callback = NULL;
@@ -139,6 +130,16 @@ xwl_present_cleanup(WindowPtr window)
}
/* Clear remaining buffer releases and inform Present about free ressources */
+ event = xwl_present_window->sync_flip;
+ xwl_present_window->sync_flip = NULL;
+ if (event) {
+ if (event->buffer_released) {
+ free(event);
+ } else {
+ event->pending = FALSE;
+ event->abort = TRUE;
+ }
+ }
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->release_queue, list) {
xorg_list_del(&event->list);
event->abort = TRUE;
@@ -192,11 +193,31 @@ static const struct wl_buffer_listener xwl_present_release_listener = {
};
static void
-xwl_present_events_notify(struct xwl_present_window *xwl_present_window)
+xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
{
- uint64_t msc = xwl_present_window->msc;
+ uint64_t msc = ++xwl_present_window->msc;
struct xwl_present_event *event, *tmp;
+ xwl_present_window->ust = GetTimeInMicros();
+
+ event = xwl_present_window->sync_flip;
+ xwl_present_window->sync_flip = NULL;
+ if (event) {
+ event->pending = FALSE;
+
+ present_wnmd_event_notify(xwl_present_window->window, event->event_id,
+ xwl_present_window->ust, msc);
+
+ if (event->buffer_released) {
+ /* If the buffer was already released, clean up now */
+ present_wnmd_event_notify(xwl_present_window->window, event->event_id,
+ xwl_present_window->ust, msc);
+ free(event);
+ } else {
+ xorg_list_add(&event->list, &xwl_present_window->release_queue);
+ }
+ }
+
xorg_list_for_each_entry_safe(event, tmp,
&xwl_present_window->event_list,
list) {
@@ -216,24 +237,13 @@ xwl_present_timer_callback(OsTimerPtr timer,
void *arg)
{
struct xwl_present_window *xwl_present_window = arg;
- WindowPtr present_window = xwl_present_window->window;
- struct xwl_window *xwl_window = xwl_window_from_window(present_window);
xwl_present_window->frame_timer_firing = TRUE;
- xwl_present_window->msc++;
- xwl_present_window->ust = GetTimeInMicros();
- xwl_present_events_notify(xwl_present_window);
+ xwl_present_msc_bump(xwl_present_window);
+ xwl_present_reset_timer(xwl_present_window);
- if (xwl_present_has_events(xwl_present_window)) {
- /* Still events, restart timer */
- return xwl_present_is_flipping(present_window, xwl_window) ? TIMER_LEN_FLIP :
- TIMER_LEN_COPY;
- } else {
- /* No more events, do not restart timer and delete it instead */
- xwl_present_free_timer(xwl_present_window);
- return 0;
- }
+ return 0;
}
static void
@@ -251,10 +261,7 @@ xwl_present_frame_callback(void *data,
return;
}
- xwl_present_window->msc++;
- xwl_present_window->ust = GetTimeInMicros();
-
- xwl_present_events_notify(xwl_present_window);
+ xwl_present_msc_bump(xwl_present_window);
/* we do not need the timer anymore for this frame,
* reset it for potentially the next one
@@ -274,6 +281,9 @@ xwl_present_sync_callback(void *data,
struct xwl_present_event *event = data;
struct xwl_present_window *xwl_present_window = event->xwl_present_window;
+ wl_callback_destroy(xwl_present_window->sync_callback);
+ xwl_present_window->sync_callback = NULL;
+
event->pending = FALSE;
if (event->abort) {
@@ -289,12 +299,14 @@ xwl_present_sync_callback(void *data,
xwl_present_window->ust,
xwl_present_window->msc);
- if (event->buffer_released)
+ if (event->buffer_released) {
/* If the buffer was already released, send the event now again */
present_wnmd_event_notify(xwl_present_window->window,
event->event_id,
xwl_present_window->ust,
xwl_present_window->msc);
+ xwl_present_free_event(event);
+ }
}
static const struct wl_callback_listener xwl_present_sync_listener = {
@@ -311,6 +323,10 @@ xwl_present_get_crtc(WindowPtr present_window)
return NULL;
rr_private = rrGetScrPriv(present_window->drawable.pScreen);
+
+ if (rr_private->numCrtcs == 0)
+ return NULL;
+
return rr_private->crtcs[0];
}
@@ -337,17 +353,9 @@ xwl_present_queue_vblank(WindowPtr present_window,
uint64_t event_id,
uint64_t msc)
{
- struct xwl_window *xwl_window = xwl_window_from_window(present_window);
struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(present_window);
struct xwl_present_event *event;
- if (!xwl_window)
- return BadMatch;
-
- if (xwl_window->present_window &&
- xwl_window->present_window != present_window)
- return BadMatch;
-
event = malloc(sizeof *event);
if (!event)
return BadAlloc;
@@ -417,13 +425,6 @@ xwl_present_check_flip2(RRCrtcPtr crtc,
return FALSE;
/*
- * Do not flip if there is already another child window doing flips.
- */
- if (xwl_window->present_window &&
- xwl_window->present_window != present_window)
- return FALSE;
-
- /*
* We currently only allow flips of windows, that have the same
* dimensions as their xwl_window parent window. For the case of
* different sizes subsurfaces are presumably the way forward.
@@ -459,19 +460,22 @@ xwl_present_flip(WindowPtr present_window,
if (!event)
return FALSE;
- xwl_window->present_window = present_window;
-
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap, &buffer_created);
event->event_id = event_id;
event->xwl_present_window = xwl_present_window;
event->buffer = buffer;
- event->target_msc = xwl_present_window->msc;
+ event->target_msc = target_msc;
event->pending = TRUE;
event->abort = FALSE;
event->buffer_released = FALSE;
- xorg_list_add(&event->list, &xwl_present_window->release_queue);
+ if (sync_flip) {
+ xorg_list_init(&event->list);
+ xwl_present_window->sync_flip = event;
+ } else {
+ xorg_list_add(&event->list, &xwl_present_window->release_queue);
+ }
if (buffer_created)
wl_buffer_add_listener(buffer, &xwl_present_release_listener, NULL);
@@ -480,13 +484,6 @@ xwl_present_flip(WindowPtr present_window,
/* We can flip directly to the main surface (full screen window without clips) */
wl_surface_attach(xwl_window->surface, buffer, 0, 0);
- if (!xwl_present_window->frame_timer ||
- xwl_present_window->frame_timer_firing) {
- /* Realign timer */
- xwl_present_window->frame_timer_firing = FALSE;
- xwl_present_reset_timer(xwl_present_window);
- }
-
if (!xwl_present_window->frame_callback) {
xwl_present_window->frame_callback = wl_surface_frame(xwl_window->surface);
wl_callback_add_listener(xwl_present_window->frame_callback,
@@ -494,35 +491,51 @@ xwl_present_flip(WindowPtr present_window,
xwl_present_window);
}
+ /* Realign timer */
+ xwl_present_window->frame_timer_firing = FALSE;
+ xwl_present_reset_timer(xwl_present_window);
+
wl_surface_damage(xwl_window->surface, 0, 0,
damage_box->x2 - damage_box->x1,
damage_box->y2 - damage_box->y1);
wl_surface_commit(xwl_window->surface);
- xwl_present_window->sync_callback = wl_display_sync(xwl_window->xwl_screen->display);
- wl_callback_add_listener(xwl_present_window->sync_callback,
- &xwl_present_sync_listener,
- event);
+ if (!sync_flip) {
+ xwl_present_window->sync_callback =
+ wl_display_sync(xwl_window->xwl_screen->display);
+ wl_callback_add_listener(xwl_present_window->sync_callback,
+ &xwl_present_sync_listener,
+ event);
+ }
wl_display_flush(xwl_window->xwl_screen->display);
+ xwl_window->present_flipped = TRUE;
return TRUE;
}
static void
xwl_present_flips_stop(WindowPtr window)
{
- struct xwl_window *xwl_window = xwl_window_from_window(window);
struct xwl_present_window *xwl_present_window = xwl_present_window_priv(window);
- if (!xwl_window)
- return;
+ /* Change back to the fast refresh rate */
+ xwl_present_reset_timer(xwl_present_window);
+}
- assert(xwl_window->present_window == window);
+void
+xwl_present_unrealize_window(WindowPtr window)
+{
+ struct xwl_present_window *xwl_present_window = xwl_present_window_priv(window);
- xwl_window->present_window = NULL;
+ if (!xwl_present_window || !xwl_present_window->frame_callback)
+ return;
- /* Change back to the fast refresh rate */
+ /* The pending frame callback may never be called, so drop it and shorten
+ * the frame timer interval.
+ */
+ wl_callback_destroy(xwl_present_window->frame_callback);
+ xwl_present_window->frame_callback = NULL;
xwl_present_reset_timer(xwl_present_window);
}
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 96b4db18c..7e6e0ab25 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -370,6 +370,18 @@ damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data)
struct xwl_window *xwl_window = data;
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
+#ifdef GLAMOR_HAS_GBM
+ if (xwl_window->present_flipped) {
+ /* This damage is from a Present flip, which already committed a new
+ * buffer for the surface, so we don't need to do anything in response
+ */
+ RegionEmpty(DamageRegion(pDamage));
+ xorg_list_del(&xwl_window->link_damage);
+ xwl_window->present_flipped = FALSE;
+ return;
+ }
+#endif
+
xorg_list_add(&xwl_window->link_damage, &xwl_screen->damage_window_list);
}
@@ -597,6 +609,11 @@ xwl_unrealize_window(WindowPtr window)
xwl_screen->UnrealizeWindow = screen->UnrealizeWindow;
screen->UnrealizeWindow = xwl_unrealize_window;
+#ifdef GLAMOR_HAS_GBM
+ if (xwl_screen->present)
+ xwl_present_unrealize_window(window);
+#endif
+
xwl_window = xwl_window_get(window);
if (!xwl_window)
return ret;
@@ -721,11 +738,6 @@ xwl_screen_post_damage(struct xwl_screen *xwl_screen)
xorg_list_for_each_entry_safe(xwl_window, next_xwl_window,
&xwl_screen->damage_window_list, link_damage) {
-#ifdef GLAMOR_HAS_GBM
- /* Present on the main surface. So don't commit here as well. */
- if (xwl_window->present_window)
- continue;
-#endif
/* If we're waiting on a frame callback from the server,
* don't attach a new buffer. */
if (xwl_window->frame_callback)
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index 67819e178..463622669 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -182,12 +182,15 @@ struct xwl_window {
struct xorg_list link_damage;
struct wl_callback *frame_callback;
Bool allow_commits;
- WindowPtr present_window;
+#ifdef GLAMOR_HAS_GBM
+ Bool present_flipped;
+#endif
};
#ifdef GLAMOR_HAS_GBM
struct xwl_present_window {
struct xwl_screen *xwl_screen;
+ struct xwl_present_event *sync_flip;
WindowPtr window;
struct xorg_list link;
@@ -451,6 +454,7 @@ void xwl_glamor_egl_make_current(struct xwl_screen *xwl_screen);
#ifdef GLAMOR_HAS_GBM
Bool xwl_present_init(ScreenPtr screen);
void xwl_present_cleanup(WindowPtr window);
+void xwl_present_unrealize_window(WindowPtr window);
#endif /* GLAMOR_HAS_GBM */
#ifdef XV
diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am
index 160bef5b0..ae9debe5c 100644
--- a/hw/xwin/glx/Makefile.am
+++ b/hw/xwin/glx/Makefile.am
@@ -55,9 +55,10 @@ generated_gl_thunks.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml
generated_gl_thunks.def: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py
$(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunkdefs $(GENGLWRAPPERSOPTS) -outfile $@
-endif
BUILT_SOURCES = generated_gl_shim.ic generated_gl_thunks.ic generated_gl_thunks.def generated_wgl_wrappers.ic
CLEANFILES = $(BUILT_SOURCES)
+endif
+
EXTRA_DIST = gen_gl_wrappers.py
diff --git a/include/Makefile.am b/include/Makefile.am
index 0ce7faa6e..9c22ce113 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -79,5 +79,8 @@ EXTRA_DIST = \
swapreq.h \
systemd-logind.h \
vidmodestr.h \
+ xorg-config.h.meson.in \
xorg-server.h.meson.in \
+ xwayland-config.h.meson.in \
+ xwin-config.h.meson.in \
xsha1.h
diff --git a/include/xserver_poll.h b/include/xserver_poll.h
index 5a42307df..0f3a37c73 100644
--- a/include/xserver_poll.h
+++ b/include/xserver_poll.h
@@ -24,7 +24,7 @@
#define _XSERVER_POLL_H_
#ifndef _DIX_CONFIG_H_
-#error must inclue dix-config.h to use xserver_poll.h
+#error must include dix-config.h to use xserver_poll.h
#endif
#ifdef HAVE_POLL
diff --git a/meson.build b/meson.build
index beb9ab94b..bbd22ab3b 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@ project('xserver', 'c',
'buildtype=debugoptimized',
'c_std=gnu99',
],
- version: '1.20.3',
+ version: '1.20.4',
meson_version: '>= 0.47.0',
)
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: 'c')
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 5596e212f..b7c702127 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -190,7 +190,7 @@ EnableDisableExtension(const char *name, Bool enable)
for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) {
ext = &staticExtensions[i];
- if (strcmp(name, ext->name) == 0) {
+ if (strcasecmp(name, ext->name) == 0) {
if (ext->disablePtr != NULL) {
*ext->disablePtr = !enable;
return TRUE;
diff --git a/os/auth.c b/os/auth.c
index 675398625..611e4efb1 100644
--- a/os/auth.c
+++ b/os/auth.c
@@ -42,6 +42,7 @@ from The Open Group.
#include "dixstruct.h"
#include <sys/types.h>
#include <sys/stat.h>
+#include <errno.h>
#ifdef WIN32
#include <X11/Xw32defs.h>
#endif
@@ -119,9 +120,15 @@ LoadAuthorization(void)
if (!authorization_file)
return 0;
+ errno = 0;
f = Fopen(authorization_file, "r");
- if (!f)
+ if (!f) {
+ LogMessageVerb(X_ERROR, 0,
+ "Failed to open authorization file \"%s\": %s\n",
+ authorization_file,
+ errno != 0 ? strerror(errno) : "Unknown error");
return -1;
+ }
while ((auth = XauReadAuth(f)) != 0) {
for (i = 0; i < NUM_AUTHORIZATION; i++) {
diff --git a/os/utils.c b/os/utils.c
index eb2c3b8e8..7764418f0 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -486,14 +486,15 @@ GetTimeInMicros(void)
struct timeval tv;
#ifdef MONOTONIC_CLOCK
struct timespec tp;
+ static clockid_t uclockid;
- if (!clockid) {
+ if (!uclockid) {
if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
- clockid = CLOCK_MONOTONIC;
+ uclockid = CLOCK_MONOTONIC;
else
- clockid = ~0L;
+ uclockid = ~0L;
}
- if (clockid != ~0L && clock_gettime(clockid, &tp) == 0)
+ if (uclockid != ~0L && clock_gettime(uclockid, &tp) == 0)
return (CARD64) tp.tv_sec * (CARD64)1000000 + tp.tv_nsec / 1000;
#endif
diff --git a/present/present.c b/present/present.c
index 37cbf0720..3eddb7434 100644
--- a/present/present.c
+++ b/present/present.c
@@ -108,7 +108,7 @@ present_pixmap_idle(PixmapPtr pixmap, WindowPtr window, CARD32 serial, struct pr
if (present_fence)
present_fence_set_triggered(present_fence);
if (window) {
- DebugPresent(("\ti %08lx\n", pixmap ? pixmap->drawable.id : 0));
+ DebugPresent(("\ti %08" PRIx32 "\n", pixmap ? pixmap->drawable.id : 0));
present_send_idle_notify(window, serial, pixmap, present_fence);
}
}
diff --git a/present/present_priv.h b/present/present_priv.h
index f62456755..5849b9e0b 100644
--- a/present/present_priv.h
+++ b/present/present_priv.h
@@ -34,6 +34,7 @@
#include <syncsrv.h>
#include <xfixes.h>
#include <randrstr.h>
+#include <inttypes.h>
#if 0
#define DebugPresent(x) ErrorF x
diff --git a/present/present_scmd.c b/present/present_scmd.c
index 0803a0c0b..6a580cb7a 100644
--- a/present/present_scmd.c
+++ b/present/present_scmd.c
@@ -133,12 +133,12 @@ present_check_flip(RRCrtcPtr crtc,
/* Ask the driver for permission */
if (screen_priv->info->version >= 1 && screen_priv->info->check_flip2) {
if (!(*screen_priv->info->check_flip2) (crtc, window, pixmap, sync_flip, reason)) {
- DebugPresent(("\td %08lx -> %08lx\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0));
+ DebugPresent(("\td %08" PRIx32 " -> %08" PRIx32 "\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0));
return FALSE;
}
} else if (screen_priv->info->check_flip) {
if (!(*screen_priv->info->check_flip) (crtc, window, pixmap, sync_flip)) {
- DebugPresent(("\td %08lx -> %08lx\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0));
+ DebugPresent(("\td %08" PRIx32 " -> %08" PRIx32 "\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0));
return FALSE;
}
}
@@ -351,7 +351,7 @@ present_unflip(ScreenPtr screen)
present_restore_screen_pixmap(screen);
screen_priv->unflip_event_id = ++present_event_id;
- DebugPresent(("u %lld\n", screen_priv->unflip_event_id));
+ DebugPresent(("u %" PRIu64 "\n", screen_priv->unflip_event_id));
(*screen_priv->info->unflip) (screen, screen_priv->unflip_event_id);
}
@@ -361,7 +361,7 @@ present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
ScreenPtr screen = vblank->screen;
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
- DebugPresent(("\tn %lld %p %8lld: %08lx -> %08lx\n",
+ DebugPresent(("\tn %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
vblank->event_id, vblank, vblank->target_msc,
vblank->pixmap ? vblank->pixmap->drawable.id : 0,
vblank->window ? vblank->window->drawable.id : 0));
@@ -402,7 +402,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc)
if (!event_id)
return;
- DebugPresent(("\te %lld ust %lld msc %lld\n", event_id, ust, msc));
+ DebugPresent(("\te %" PRIu64 " ust %" PRIu64 " msc %" PRIu64 "\n", event_id, ust, msc));
xorg_list_for_each_entry(vblank, &present_exec_queue, event_queue) {
int64_t match = event_id - vblank->event_id;
if (match == 0) {
@@ -425,7 +425,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc)
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
if (event_id == screen_priv->unflip_event_id) {
- DebugPresent(("\tun %lld\n", event_id));
+ DebugPresent(("\tun %" PRIu64 "\n", event_id));
screen_priv->unflip_event_id = 0;
present_flip_idle(screen);
present_flip_try_ready(screen);
@@ -547,7 +547,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
if (vblank->flip && vblank->pixmap && vblank->window) {
if (screen_priv->flip_pending || screen_priv->unflip_event_id) {
- DebugPresent(("\tr %lld %p (pending %p unflip %lld)\n",
+ DebugPresent(("\tr %" PRIu64 " %p (pending %p unflip %" PRIu64 ")\n",
vblank->event_id, vblank,
screen_priv->flip_pending, screen_priv->unflip_event_id));
xorg_list_del(&vblank->event_queue);
@@ -565,7 +565,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
if (vblank->flip) {
- DebugPresent(("\tf %lld %p %8lld: %08lx -> %08lx\n",
+ DebugPresent(("\tf %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
vblank->event_id, vblank, crtc_msc,
vblank->pixmap->drawable.id, vblank->window->drawable.id));
@@ -609,7 +609,8 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
screen_priv->flip_pending = NULL;
vblank->flip = FALSE;
}
- DebugPresent(("\tc %p %8lld: %08lx -> %08lx\n", vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id));
+ DebugPresent(("\tc %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
+ vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id));
if (screen_priv->flip_pending) {
/* Check pending flip
@@ -713,7 +714,7 @@ present_scmd_pixmap(WindowPtr window,
if (vblank->crtc != target_crtc || vblank->target_msc != target_msc)
continue;
- DebugPresent(("\tx %lld %p %8lld: %08lx -> %08lx (crtc %p)\n",
+ DebugPresent(("\tx %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 " (crtc %p)\n",
vblank->event_id, vblank, vblank->target_msc,
vblank->pixmap->drawable.id, vblank->window->drawable.id,
vblank->crtc));
diff --git a/present/present_vblank.c b/present/present_vblank.c
index f93a1afa9..2c124f4bb 100644
--- a/present/present_vblank.c
+++ b/present/present_vblank.c
@@ -138,7 +138,7 @@ present_vblank_create(WindowPtr window,
}
if (pixmap)
- DebugPresent(("q %lld %p %8lld: %08lx -> %08lx (crtc %p) flip %d vsync %d serial %d\n",
+ DebugPresent(("q %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 " (crtc %p) flip %d vsync %d serial %d\n",
vblank->event_id, vblank, *target_msc,
vblank->pixmap->drawable.id, vblank->window->drawable.id,
target_crtc, vblank->flip, vblank->sync_flip, vblank->serial));
@@ -153,7 +153,7 @@ no_mem:
void
present_vblank_scrap(present_vblank_ptr vblank)
{
- DebugPresent(("\tx %lld %p %8lld: %08lx -> %08lx (crtc %p)\n",
+ DebugPresent(("\tx %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 " (crtc %p)\n",
vblank->event_id, vblank, vblank->target_msc,
vblank->pixmap->drawable.id, vblank->window->drawable.id,
vblank->crtc));
@@ -175,7 +175,7 @@ present_vblank_destroy(present_vblank_ptr vblank)
/* Also make sure vblank is removed from event queue (wnmd) */
xorg_list_del(&vblank->event_queue);
- DebugPresent(("\td %lld %p %8lld: %08lx -> %08lx\n",
+ DebugPresent(("\td %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
vblank->event_id, vblank, vblank->target_msc,
vblank->pixmap ? vblank->pixmap->drawable.id : 0,
vblank->window ? vblank->window->drawable.id : 0));
diff --git a/present/present_wnmd.c b/present/present_wnmd.c
index 8f3836440..9d0b147cc 100644
--- a/present/present_wnmd.c
+++ b/present/present_wnmd.c
@@ -168,7 +168,7 @@ present_wnmd_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_
WindowPtr window = vblank->window;
present_window_priv_ptr window_priv = present_window_priv(window);
- DebugPresent(("\tn %lld %p %8lld: %08lx -> %08lx\n",
+ DebugPresent(("\tn %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
vblank->event_id, vblank, vblank->target_msc,
vblank->pixmap ? vblank->pixmap->drawable.id : 0,
vblank->window ? vblank->window->drawable.id : 0));
@@ -213,7 +213,7 @@ present_wnmd_event_notify(WindowPtr window, uint64_t event_id, uint64_t ust, uin
return;
}
- DebugPresent(("\te %lld ust %lld msc %lld\n", event_id, ust, msc));
+ DebugPresent(("\te %" PRIu64 " ust %" PRIu64 " msc %" PRIu64 "\n", event_id, ust, msc));
xorg_list_for_each_entry(vblank, &window_priv->exec_queue, event_queue) {
if (event_id == vblank->event_id) {
present_wnmd_execute(vblank, ust, msc);
@@ -270,8 +270,8 @@ present_wnmd_check_flip(RRCrtcPtr crtc,
if (!screen_priv->wnmd_info->flip)
return FALSE;
- /* Don't flip redirected windows */
- if (window->redirectDraw != RedirectDrawNone)
+ /* Can't flip redirected child windows */
+ if (screen->GetWindowPixmap(window) != screen->GetWindowPixmap(toplvl_window))
return FALSE;
/* Source pixmap must align with window exactly */
@@ -292,7 +292,8 @@ present_wnmd_check_flip(RRCrtcPtr crtc,
/* Ask the driver for permission */
if (screen_priv->wnmd_info->check_flip2) {
if (!(*screen_priv->wnmd_info->check_flip2) (crtc, window, pixmap, sync_flip, reason)) {
- DebugPresent(("\td %08lx -> %08lx\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0));
+ DebugPresent(("\td %08" PRIx32 " -> %08" PRIx32 "\n",
+ window->drawable.id, pixmap ? pixmap->drawable.id : 0));
return FALSE;
}
}
@@ -354,7 +355,7 @@ present_wnmd_flip(WindowPtr window,
Bool sync_flip,
RegionPtr damage)
{
- ScreenPtr screen = crtc->pScreen;
+ ScreenPtr screen = window->drawable.pScreen;
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
return (*screen_priv->wnmd_info->flip) (window,
@@ -425,7 +426,7 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
if (vblank->flip && vblank->pixmap && vblank->window) {
if (window_priv->flip_pending) {
- DebugPresent(("\tr %lld %p (pending %p)\n",
+ DebugPresent(("\tr %" PRIu64 " %p (pending %p)\n",
vblank->event_id, vblank,
window_priv->flip_pending));
xorg_list_del(&vblank->event_queue);
@@ -444,7 +445,7 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
if (vblank->flip) {
RegionPtr damage;
- DebugPresent(("\tf %lld %p %8lld: %08lx -> %08lx\n",
+ DebugPresent(("\tf %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
vblank->event_id, vblank, crtc_msc,
vblank->pixmap->drawable.id, vblank->window->drawable.id));
@@ -489,7 +490,8 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
window_priv->flip_pending = NULL;
vblank->flip = FALSE;
}
- DebugPresent(("\tc %p %8lld: %08lx -> %08lx\n", vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id));
+ DebugPresent(("\tc %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
+ vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id));
present_wnmd_cancel_flip(window);
diff --git a/test/scripts/build-travis-deps.sh b/test/scripts/build-travis-deps.sh
deleted file mode 100755
index f52587dd5..000000000
--- a/test/scripts/build-travis-deps.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-export PREFIX=/usr
-export TRAVIS_BUILD_DIR=/root
-export PIGLIT_DIR=$TRAVIS_BUILD_DIR/piglit
-export XTEST_DIR=$TRAVIS_BUILD_DIR/xts
-
-cat > "$PIGLIT_DIR"/piglit.conf << _EOF_
-[xts]
-path=$XTEST_DIR
-_EOF_
-
-# awful
-cp test/tetexec.cfg $XTEST_DIR/xts5
-
-set -x
-
-meson setup build/
-meson configure -Dprefix=$PREFIX build/
-ninja -C build/ install
-ninja -C build/ test
-
-status=$?
-
-cat build/meson-logs/testlog.txt
-cat build/test/piglit-results/xvfb/long-summary || :
-# there should be a better way of extracting results, but:
-# find build/test/piglit-results/xvfb/ | grep setfontpath | xargs cat
-# isn't the worst thing ever
-
-exit $status
diff --git a/test/scripts/run-piglit.sh b/test/scripts/run-piglit.sh
index b999c2598..8b9fda1a4 100755
--- a/test/scripts/run-piglit.sh
+++ b/test/scripts/run-piglit.sh
@@ -46,8 +46,8 @@ $XSERVER_BUILDDIR/test/simple-xinit \
# Write out piglit-summaries.
SHORT_SUMMARY=$PIGLIT_RESULTS_DIR/summary
LONG_SUMMARY=$PIGLIT_RESULTS_DIR/long-summary
-$PIGLIT_DIR/piglit-summary.py -s $PIGLIT_RESULTS_DIR > $SHORT_SUMMARY
-$PIGLIT_DIR/piglit-summary.py $PIGLIT_RESULTS_DIR > $LONG_SUMMARY
+$PIGLIT_DIR/piglit summary console -s $PIGLIT_RESULTS_DIR > $SHORT_SUMMARY
+$PIGLIT_DIR/piglit summary console $PIGLIT_RESULTS_DIR > $LONG_SUMMARY
# Write the short summary to make check's log file.
cat $SHORT_SUMMARY
@@ -66,7 +66,7 @@ if ! grep "^ *crash: *0$" $SHORT_SUMMARY > /dev/null; then
status=1
fi
-$PIGLIT_DIR/piglit-summary-html.py \
+$PIGLIT_DIR/piglit summary html \
--overwrite \
$PIGLIT_RESULTS_DIR/html \
$PIGLIT_RESULTS_DIR
diff --git a/test/scripts/xinit-piglit-session.sh b/test/scripts/xinit-piglit-session.sh
index c26735d49..b495c96d6 100755
--- a/test/scripts/xinit-piglit-session.sh
+++ b/test/scripts/xinit-piglit-session.sh
@@ -24,15 +24,6 @@ fi
cd $PIGLIT_DIR
-# Write the piglit.conf we'll use for our testing. Don't use the
-# default piglit.conf name because that may overwrite a local
-# piglit.conf.
-PIGLITCONF=piglit-xserver-test.conf
-cat <<EOF > $PIGLITCONF
-[xts]
-path=$XTEST_DIR
-EOF
-
# Skip some tests that are failing at the time of importing the script.
# "REPORT: min_bounds, rbearing was 0, expecting 2"
PIGLIT_ARGS="$PIGLIT_ARGS -x xlistfontswithinfo@3"
@@ -41,4 +32,4 @@ PIGLIT_ARGS="$PIGLIT_ARGS -x xloadqueryfont@1"
PIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@1"
PIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@2"
-exec ./piglit-run.py xts-render -f $PIGLITCONF $PIGLIT_ARGS $PIGLIT_RESULTS_DIR
+exec ./piglit run xts-render $PIGLIT_ARGS $PIGLIT_RESULTS_DIR
diff --git a/test/tetexec.cfg b/test/tetexec.cfg
deleted file mode 100644
index dd919900d..000000000
--- a/test/tetexec.cfg
+++ /dev/null
@@ -1,497 +0,0 @@
-#
-# Copyright (c) 2005 X.Org Foundation L.L.C.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy of
-# this software and associated documentation files (the "Software"), to deal in
-# the Software without restriction, including without limitation the rights to
-# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is furnished to do
-# so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-# Copyright (c) Applied Testing and Technology, Inc. 1995
-# All Rights Reserved.
-#
-# Project: VSW5
-#
-# File: tetexec.cfg
-#
-# Description:
-# Execute configuration file for VSW5
-#
-# Modifications:
-# $Log: tetexec.cfg,v $
-# Revision 1.2 2005-11-03 08:42:00 jmichael
-# clean up all vsw5 paths to use xts5 instead.
-#
-# Revision 1.1.1.2 2005/04/15 14:05:06 anderson
-# Reimport of the base with the legal name in the copyright fixed.
-#
-# Revision 8.0 1998/12/23 23:39:36 mar
-# Branch point for Release 5.0.2
-#
-# Revision 7.0 1998/10/30 23:02:43 mar
-# Branch point for Release 5.0.2b1
-#
-# Revision 6.0 1998/03/02 05:30:36 tbr
-# Branch point for Release 5.0.1
-#
-# Revision 5.1 1998/02/24 03:36:35 andy
-# Added the XT_COVERAGE variable.
-#
-# Revision 5.0 1998/01/26 03:27:10 tbr
-# Branch point for Release 5.0.1b1
-#
-# Revision 4.2 1998/01/23 00:37:47 tbr
-# Fix XT_FONTSET typo. Add some variable descriptions.
-#
-# Revision 4.1 1998/01/22 05:28:25 tbr
-# req.4.W.00029 vswsr126 vswsr125 vswsr124 vswsr122 vswsr127
-# Added new fonts and modified XT_FONTSET to select those fonts
-# and realigned the data files associated with certain tests
-# to match the expected results when using the new fonts
-#
-# Revision 4.0 1995/12/15 09:26:02 tbr
-# Branch point for Release 5.0.0
-#
-# Revision 3.1 1995/12/15 00:33:13 andy
-# Prepare for GA Release
-#
-
-# Portions of this software are based on Xlib and X Protocol Test Suite.
-# We have used this material under the terms of its copyright, which grants
-# free use, subject to the conditions below. Note however that those
-# portions of this software that are based on the original Test Suite have
-# been significantly revised and that all such revisions are copyright (c)
-# 1995 Applied Testing and Technology, Inc. Insomuch as the proprietary
-# revisions cannot be separated from the freely copyable material, the net
-# result is that use of this software is governed by the ApTest copyright.
-#
-# Copyright (c) 1990, 1991 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not be
-# used in advertising or otherwise to promote the sale, use or other dealings
-# in this Software without prior written authorization from the X Consortium.
-#
-# Copyright 1990, 1991 by UniSoft Group Limited.
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee,
-# provided that the above copyright notice appear in all copies and that
-# both that copyright notice and this permission notice appear in
-# supporting documentation, and that the name of and UniSoft not be
-# used in advertising or publicity pertaining to distribution of the
-# software without specific, written prior permission. and UniSoft
-# makes no representations about the suitability of this software for any
-# purpose. It is provided "as is" without express or implied warranty.
-#
-# $XConsortium: tetexec.cfg,v 1.27 94/04/17 20:59:59 rws Exp $
-#
-###########################################################################
-# This file contains run-time parameters for the test suite.
-# They are accessed with the tet_getvar() function.
-###########################################################################
-
-##############################################
-# Configuration parameters defined by the TET
-##############################################
-
-# TET_EXEC_IN_PLACE - Setting this variable to False indicates that
-# files will be executed in a temporary execution directory.
-# Use of a temporary execution directory for each test enables
-# parallel execution of the test suite against multiple servers.
-# Setting this variable to True will give you improved performance if
-# you are not attempting parallel execution of the test suite against
-# multiple servers.
-TET_EXEC_IN_PLACE=True
-
-# TET_EXEC_LOCK - Indicate whether file locking should be used. Setting
-# this variable to True means that a "tet_lock" file will be created in
-# the execution directory of the test program. When this file exists,
-# tcc will skip that test.
-TET_EXEC_LOCK=False
-
-# TET_SAVE_FILES - This indicates which files generated during execution of
-# tests are to be saved for later examination.
-# This line should not be altered.
-TET_SAVE_FILES=Err*.err,*.sav
-
-###########################################################
-# General configuration parameters
-###########################################################
-
-# XT_COVERAGE - There are three different levels of coverage that can be
-# tested. They are largely identical but effect a few tests which
-# are in a transitional state in terms of consistency of the specification,
-# test suite, and sample code. The value of this variable determines
-# whether these tests are run, or return results of UNTESTED.
-#
-# 0 - All tests are run. This level is intended for use only by
-# developers of the sample code and the test suite as
-# it enables execution of tests which are under investigation.
-# 1 - All tests which should pass are run. At present this
-# is as of R6.4gamma of the sample code. This value
-# must be used to brand implementations derived from the
-# sample code at this revision or above. Otherwise see value 2.
-# 2 - This value may be used in the branding of implementations
-# which are derived from revisions of the sample code earlier
-# than R6.4gamma.
-#
-# Please see Section 4.1.2 of the User's Guide for additional information.
-XT_COVERAGE=1
-
-# XT_ALT_SCREEN - If the display supports more than one screen then
-# this parameter should be set to one that is not under test.
-# Set to the string UNSUPPORTED if only one screen is available.
-XT_ALT_SCREEN=UNSUPPORTED
-
-# XT_FONTPATH -
-# This should be set to a comma separated list that is a valid font path
-# for the X server.
-# It should include at least the components of the default font path
-# for the X server enabling the cursor font to be accessed.
-# One of the entries in the list must be the directory in which
-# the test fonts were installed.
-XT_FONTPATH=/root/xts/xts5/fonts,catalogue:/etc/X11/fontpath.d,built-ins
-
-# XT_SPEEDFACTOR - Specifies a multiplier used for timing.
-# This should be set >= 1.
-# This is a speedfactor which should be set to reflect the relative delay
-# in response of the underlying operating system and X server combined.
-# Co-operating processes which must synchronize allow a time delay in
-# proportion to this speedfactor, to account for scheduling delays in the
-# underlying operating system and X server.
-# There should be no need to change the default unless the round trip
-# time to the X server can be very long ( >15 seconds); in this case set this
-# parameter to a value larger than the maximum round trip time divided
-# by 3.
-XT_SPEEDFACTOR=1
-
-# XT_RESET_DELAY - Specifies a delay time in seconds.
-# Set this to be a time which is greater than or equal to the maximum time
-# required by your server to reset when the last client is closed.
-# The test suite pauses for this time whenever a connection is about to be
-# opened and the server may be resetting.
-# The server may be resetting when the test case is entered (in startup())
-# as a result of closing the last connection in the previous test case.
-# The server also resets in a few places in the test for XCloseDisplay().
-XT_RESET_DELAY=1
-
-# XT_EXTENSIONS - Specifies whether you wish to test the extended assertions
-# which require the XTEST extension.
-# Set this to Yes if the XTEST extension is available on your system,
-# and you have configured the test suite to use the XTEST extension,
-# and you want to execute these tests, otherwise set to No.
-XT_EXTENSIONS=Yes
-
-###########################################################
-# Configuration parameters for specific tests
-###########################################################
-
-# XT_VISUAL_CLASSES - A space separated list of the visual classes that
-# are supported for the screen given by DISPLAY. Each visual class
-# is followed by a list of depths at which the class is supported
-# (enclosed by brackets and separated by commas with no spaces).
-# Visual classes and depths that are supported only by other screens
-# should not be included.
-# Note - this parameter is used to check the correctness of the information
-# returned by XMatchVisualInfo and XGetVisualInfo. Other tests which loop
-# over visuals obtain the visuals by calling these functions.
-# Example values are:
-XT_VISUAL_CLASSES=DirectColor(24) TrueColor(24) TrueColor(32)
-
-# XT_FONTCURSOR_GOOD - This specifies the number of a glyph in the
-# default cursor font known to exist.
-# XT_FONTCURSOR_GOOD+2 should also be a glyph in the default cursor font.
-# Neither of these should be the same as the X server's default cursor.
-XT_FONTCURSOR_GOOD=2
-
-# XT_FONTCURSOR_BAD - This specifies the number of a glyph in the
-# default cursor font known not to exist. If there is no such
-# number then set this parameter to UNSUPPORTED.
-XT_FONTCURSOR_BAD=9999
-
-# XT_FONTPATH_GOOD -
-# This should be set to a comma separated list that is a valid font path
-# for the X server. It should be different to the list specified by
-# XT_FONTPATH. It need not contain the test fonts.
-XT_FONTPATH_GOOD=catalogue:/etc/X11/fontpath.d,built-ins
-
-# XT_FONTPATH_BAD - This should be set to a comma separated list that
-# is an invalid font path for the X server.
-XT_FONTPATH_BAD=/no-such-path-name
-
-# XT_BAD_FONT_NAME - This should be set to a non-existent font name.
-XT_BAD_FONT_NAME=non-existent-font-name
-
-# XT_GOOD_COLORNAME - This should be set to the name of a colour
-# which exists in the colour database for the X server.
-XT_GOOD_COLORNAME=red
-
-# XT_BAD_COLORNAME - This should be set to the name of a colour
-# which does not exist in the colour database for the X server.
-XT_BAD_COLORNAME=nosuchcolor
-
-# XT_DISPLAYMOTIONBUFFERSIZE - specifies size of pointer motion buffer
-# This should be set to a non-zero value (the value returned by
-# XDisplayMotionBufferSize) if the X server supports a more complete
-# history of pointer motion than that provided by event notification, or
-# zero otherwise.
-XT_DISPLAYMOTIONBUFFERSIZE=256
-
-###########################################################
-# Configuration parameters for Display functions
-###########################################################
-
-# XT_SCREEN_COUNT - This parameter should be set to the number of screens
-# available on the display, as returned by XScreenCount.
-XT_SCREEN_COUNT=1
-
-# XT_PIXMAP_DEPTHS - A space separated list of depths supported by
-# the specified screen of the display that can be used for pixmaps.
-XT_PIXMAP_DEPTHS=24 1 4 8 15 16 32
-
-# XT_BLACK_PIXEL - This parameter should be set to the black pixel value
-# of the specified screen of the display.
-XT_BLACK_PIXEL=0
-
-# XT_WHITE_PIXEL - This parameter should be set to the white pixel value
-# of the specified screen of the display.
-XT_WHITE_PIXEL=16777215
-
-# XT_HEIGHT_MM - This parameter should be set to the height in millimeters
-# of the specified screen of the display.
-XT_HEIGHT_MM=476
-
-# XT_WIDTH_MM - This parameter should be set to the width in millimeters
-# of the specified screen of the display.
-XT_WIDTH_MM=846
-
-# XT_PROTOCOL_VERSION - This should be set to the major version number (11)
-# of the X protocol as returned by XProtocolVersion.
-XT_PROTOCOL_VERSION=11
-
-# XT_PROTOCOL_REVISION - This should be set to the minor protocol
-# revision number as returned by XProtocolRevision.
-XT_PROTOCOL_REVISION=0
-
-# XT_SERVER_VENDOR - This should be set to the X server vendor string
-# as returned by XServerVendor.
-XT_SERVER_VENDOR=Fedora Project
-
-# XT_VENDOR_RELEASE - This should be set to the X server vendor's release
-# number as returned by XVendorRelease.
-XT_VENDOR_RELEASE=11999902
-
-# XT_DOES_SAVE_UNDERS - Set this to Yes if the specified screen of the display
-# supports save unders (indicated by XDoesSaveUnders returning True)
-# otherwise set to No.
-XT_DOES_SAVE_UNDERS=No
-
-# XT_DOES_BACKING_STORE - Set this to the following value:
-# - 0 if the way the specified screen supports backing store is NotUseful
-# - 1 if the way the specified screen supports backing store is WhenMapped
-# - 2 if the way the specified screen supports backing store is Always
-# The way the specified screen supports backing store is indicated by the
-# return value of XDoesBackingStore.
-XT_DOES_BACKING_STORE=0
-
-###########################################################
-# Configuration parameters for connection tests
-###########################################################
-
-# XT_POSIX_SYSTEM - This may be set to Yes to indicate that the
-# underlying operating system is a POSIX system. If this parameter is
-# set to Yes, some extended assertions which describe implementation
-# dependent functionality will be tested assuming POSIX concepts.
-XT_POSIX_SYSTEM=Yes
-
-# XT_TCP - Set this to yes if clients can connect to the X server under
-# test using TCP streams. This will be used (on a POSIX system)
-# in the tests for XOpenDisplay.
-XT_TCP=No
-
-# XT_DISPLAYHOST - Set this to the hostname of the machine on which
-# the display is physically attached. This will be used instead of
-# DISPLAY (on a POSIX system) in the tests for XOpenDisplay which
-# specifically test the hostname component of the display name.
-# Note that this may not be the same as the machine on which the
-# test suite clients execute (XTESTHOST).
-XT_DISPLAYHOST=
-
-# XT_LOCAL - Set this to yes if clients can connect to a local X server
-# without passing a hostname to XOpenDisplay. This will be used
-# (on a POSIX system) in the tests for XOpenDisplay.
-# This is usually the case when the X server under test is running on the
-# same platform as the X test suite.
-# When a hostname is omitted, the Xlib implementation of XOpenDisplay
-# can use the fastest available transport mechanism to make local connections.
-XT_LOCAL=Yes
-
-
-###########################################################################
-# The following variables are options which do not affect test results.
-# They only alter the accompanying output from the test suite.
-# They are accessed with the tet_getvar() function.
-###########################################################################
-
-# XT_SAVE_SERVER_IMAGE - When set to Yes, the image produced by the server
-# that is compared with the known good image is dumped to a file
-# with suffix .sav.
-XT_SAVE_SERVER_IMAGE=No
-
-# XT_OPTION_NO_CHECK - This may be set to Yes to suppress the journal file
-# records containing CHECK keywords.
-XT_OPTION_NO_CHECK=Yes
-
-# XT_OPTION_NO_TRACE - This may be set to Yes to suppress the journal file
-# records containing TRACE keywords.
-XT_OPTION_NO_TRACE=Yes
-
-###########################################################################
-# The following variables are intended for use in debugging. They should
-# not be used when running verification tests.
-# They are accessed with the tet_getvar() function.
-###########################################################################
-
-# XT_DEBUG - This may be set to a debugging level between 0 and 9.
-# A higher level produces more debugging output. Output is only
-# produced by the test suite at levels 1, 2 and 3 at present. So setting
-# this variable to 0 produces no debug output.
-XT_DEBUG=0
-
-# XT_DEBUG_OVERRIDE_REDIRECT - When set to Yes, windows are created with
-# override_redirect set. Otherwise windows are not created with
-# override_redirect set. This enables tests to be run more easily with a
-# window manager running on the same screen.
-# This should not be set to Yes for verification tests.
-XT_DEBUG_OVERRIDE_REDIRECT=No
-
-# XT_DEBUG_PAUSE_AFTER - When set to Yes, the test pauses before calls to
-# the function being tested, until Carriage Return is entered.
-# This should not be set to Yes for verification tests.
-XT_DEBUG_PAUSE_AFTER=No
-
-# XT_DEBUG_PIXMAP_ONLY - When set to Yes, tests which would normally loop over
-# both windows and pixmaps are restricted to loop over just pixmaps.
-# This should not be set to Yes for verification tests.
-# If XT_DEBUG_WINDOW_ONLY is also set, some tests will report UNRESOLVED due
-# to the fact that nothing has been tested.
-XT_DEBUG_PIXMAP_ONLY=No
-
-# XT_DEBUG_WINDOW_ONLY - When set to Yes, tests which would normally loop over
-# both windows and pixmaps are restricted to loop over just windows.
-# This should not be set to Yes for verification tests.
-# If XT_DEBUG_PIXMAP_ONLY is also set, some tests will report UNRESOLVED due
-# to the fact that nothing has been tested.
-XT_DEBUG_WINDOW_ONLY=No
-
-# XT_DEBUG_DEFAULT_DEPTHS - When set to Yes, tests which would normally loop
-# over multiple depths are restricted to test just the first visual
-# returned by XGetVisualInfo and/or the first pixmap depth returned by
-# XListDepths (depending on whether XT_DEBUG_PIXMAP_ONLY or
-# XT_DEBUG_WINDOW_ONLY is also set).
-# This should not be set to Yes for verification tests.
-# Note that the first visual returned by XGetVisualInfo may not be
-# the default visual for the screen.
-XT_DEBUG_DEFAULT_DEPTHS=No
-
-# XT_DEBUG_VISUAL_IDS - When set to a non-empty string, tests which would
-# normally loop over multiple depths are restricted to test just the
-# visuals ID's listed. Note that visual ID's for visuals on more than
-# one screen may be entered, but those used will depend on whether the test
-# being executed uses visuals on the default screen or alternate screen.
-# The visuals ID's should be entered in decimal, octal or hexadecimal
-# and separated with commas and with no intervening spaces.
-# This should not be set to a non-empty string for verification tests.
-XT_DEBUG_VISUAL_IDS=
-
-# XT_DEBUG_NO_PIXCHECK - When set to Yes, tests which would normally
-# perform pixmap verification omit this (all other processing is
-# performed in those tests as normal).
-# Pixmap verification is a scheme which compares the image produced by
-# the X server with a known good image file which is part of the test
-# suite.
-# This should not be set to Yes for verification tests.
-XT_DEBUG_NO_PIXCHECK=No
-
-# XT_DEBUG_BYTE_SEX - When set to NATIVE, REVERSE, MSB or LSB,
-# the X Protocol tests will only be executed with the specified byte sex.
-# When set to BOTH, the X Protocol tests make connections to the X server using
-# both the native and reversed byte sex.
-XT_DEBUG_BYTE_SEX=BOTH
-
-# XT_DEBUG_VISUAL_CHECK - When set to a non-zero value, the X Protocol tests
-# will pause for the specified time interval (in seconds) to enable a visual
-# check to be performed on the displayed screen contents.
-XT_DEBUG_VISUAL_CHECK=0
-
-###########################################################################
-# The following variables are intended for use only in generating known good
-# image files.
-###########################################################################
-
-# XT_FONTDIR - The directory in which the VSW5 fonts are supplied (before
-# being installed).
-# This must be set such that appending a string gives a valid file name.
-# This is normally set to $TET_ROOT/xts5/fonts/
-# This is only used by the PV library which is not part of the test suite.
-XT_FONTDIR=
-
-##############################################
-# The following variables are used in xim tests
-##############################################
-#
-
-#
-# XT_LOCALE - The locales in which input method tests are run
-#
-XT_LOCALE=C
-
-#
-# XT_FONTSET - The base font name list used to select fonts when font
-# sets are generated.
-#
-XT_FONTSET=-vsw-*-*-r-normal--*-120-75-75-*-*-*-*,-vsw-*-*-r-normal--*-180-75-75-*-*-*-*
-
-#
-# XT_LOCALE_MODIFIERS - Used to verify that XSetLocaleModifiers works
-# properly.
-#
-XT_LOCALE_MODIFIERS=@im=none
-
-#
-# XT_SAVE_IM - Used for developing and debugging input method tests.
-#
-XT_SAVE_IM=No
-
-# Undocumented variables:
-
-DISPLAY=:0
diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c
index b91692f55..8cd85dd05 100644
--- a/test/xi2/protocol-common.c
+++ b/test/xi2/protocol-common.c
@@ -259,6 +259,7 @@ init_simple(void)
screen.DeviceCursorInitialize = device_cursor_init;
screen.DeviceCursorCleanup = device_cursor_cleanup;
screen.SetCursorPosition = set_cursor_pos;
+ screen.root = &root;
dixResetPrivates();
InitAtoms();
diff --git a/test/xtest.c b/test/xtest.c
index 05d7ec1d3..fc5e43368 100644
--- a/test/xtest.c
+++ b/test/xtest.c
@@ -29,6 +29,7 @@
#include "input.h"
#include "inputstr.h"
#include "scrnintstr.h"
+#include "windowstr.h"
#include "exevents.h"
#include "extinit.h"
#include "xkbsrv.h"
@@ -58,11 +59,15 @@ device_cursor_cleanup(DeviceIntPtr dev, ScreenPtr screen)
static void
xtest_init_devices(void)
{
- ScreenRec screen;
- ClientRec server_client;
+ ScreenRec screen = {0};
+ ClientRec server_client = {0};
+ WindowRec root = {0};
+ WindowOptRec optional = {0};
/* random stuff that needs initialization */
- memset(&screen, 0, sizeof(screen));
+ root.drawable.id = 0xab;
+ root.optional = &optional;
+ screen.root = &root;
screenInfo.numScreens = 1;
screenInfo.screens[0] = &screen;
screen.myNum = 0;