xserver: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 5 09:50:48 UTC 2019


 .gitlab-ci.yml                |    2 +-
 configure.ac                  |    2 +-
 hw/xwayland/xwayland-output.c |   22 +++++++++++++++++++---
 hw/xwayland/xwayland.c        |    4 +++-
 meson.build                   |    2 +-
 5 files changed, 25 insertions(+), 7 deletions(-)

New commits:
commit 07463a40458ecc52d935b1a0bd820f6d9664da22
Author: Simon Ser <contact at emersion.fr>
Date:   Tue Sep 3 13:10:33 2019 +0300

    ci: bump DEBIAN_TAG
    
    The previous commit requires wayland-protocols 1.18. Bump DEBIAN_TAG to
    re-generate the Debian image and get the wayland-protocols update.
    
    Signed-off-by: Simon Ser <contact at emersion.fr>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b0e6c2313..1a3a479cd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,7 +18,7 @@ variables:
     DEBIAN_VERSION: testing-slim
     DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
 
-    DEBIAN_TAG: "2019-03-27-2"
+    DEBIAN_TAG: "2019-09-03"
     IMAGE_LOCAL: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
 
 include:
commit 01ed478c65227ae961d33bc1daf4a64da84f15a6
Author: Simon Ser <contact at emersion.fr>
Date:   Mon Sep 2 22:42:17 2019 +0300

    xwayland: add support for xdg-output-unstable-v1 version 3
    
    This adds support for xdg-output-unstable-v1 version 3, added in [1].
    
    This new version deprecates zxdg_output_v1.done and replaces it with
    wl_output.done. If the version is high enough, there's no need to wait for both
    an xdg_output.done event and a wl_output.done event -- we only care about
    wl_output.done.
    
    [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/962dd535372c8e4681374c23d2603cbe06cd7031
    
    Signed-off-by: Simon Ser <contact at emersion.fr>
    Reviewed-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/configure.ac b/configure.ac
index 8b1d3982e..4b71f8559 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2297,7 +2297,7 @@ AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes])
 
 dnl Xwayland DDX
 
-XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.10"
+XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.18"
 if test "x$XF86VIDMODE" = xyes; then
 	XWAYLANDMODULES="$XWAYLANDMODULES $VIDMODEPROTO"
 fi
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index aa6f37864..e32ba1284 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -308,9 +308,10 @@ output_handle_done(void *data, struct wl_output *wl_output)
 
     xwl_output->wl_output_done = TRUE;
     /* Apply the changes from wl_output only if both "done" events are received,
-     * or if xdg-output is not supported.
+     * if xdg-output is not supported or if xdg-output version is high enough.
      */
-    if (xwl_output->xdg_output_done || !xwl_output->xdg_output)
+    if (xwl_output->xdg_output_done || !xwl_output->xdg_output ||
+        zxdg_output_v1_get_version(xwl_output->xdg_output) >= 3)
         apply_output_change(xwl_output);
 }
 
@@ -352,14 +353,29 @@ xdg_output_handle_done(void *data, struct zxdg_output_v1 *xdg_output)
     struct xwl_output *xwl_output = data;
 
     xwl_output->xdg_output_done = TRUE;
-    if (xwl_output->wl_output_done)
+    if (xwl_output->wl_output_done &&
+        zxdg_output_v1_get_version(xdg_output) < 3)
         apply_output_change(xwl_output);
 }
 
+static void
+xdg_output_handle_name(void *data, struct zxdg_output_v1 *xdg_output,
+                       const char *name)
+{
+}
+
+static void
+xdg_output_handle_description(void *data, struct zxdg_output_v1 *xdg_output,
+                              const char *description)
+{
+}
+
 static const struct zxdg_output_v1_listener xdg_output_listener = {
     xdg_output_handle_logical_position,
     xdg_output_handle_logical_size,
     xdg_output_handle_done,
+    xdg_output_handle_name,
+    xdg_output_handle_description,
 };
 
 struct xwl_output *
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 2475366e0..667748a12 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -807,8 +807,10 @@ registry_global(void *data, struct wl_registry *registry, uint32_t id,
             xwl_screen->expecting_event++;
     }
     else if (strcmp(interface, "zxdg_output_manager_v1") == 0) {
+        /* We support xdg-output from version 1 to version 3 */
+        version = min(version, 3);
         xwl_screen->xdg_output_manager =
-            wl_registry_bind(registry, id, &zxdg_output_manager_v1_interface, 1);
+            wl_registry_bind(registry, id, &zxdg_output_manager_v1_interface, version);
         xwl_screen_init_xdg_output(xwl_screen);
     }
 #ifdef XWL_HAS_GLAMOR
diff --git a/meson.build b/meson.build
index 00a7e3c86..bd2ed3010 100644
--- a/meson.build
+++ b/meson.build
@@ -62,7 +62,7 @@ libdrm_req = '>= 2.4.89'
 libselinux_req = '>= 2.0.86'
 xext_req = '>= 1.0.99.4'
 wayland_req = '>= 1.3.0'
-wayland_protocols_req = '>= 1.10'
+wayland_protocols_req = '>= 1.18'
 gbm_req = '>= 10.2'
 xf86dgaproto_req = '>= 2.0.99.1'
 


More information about the xorg-commit mailing list