xserver: Branch 'xwayland-21.1' - 3 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 9 10:26:30 UTC 2021


 hw/xwayland/xwayland-output.c |    4 ++++
 meson.build                   |    2 +-
 randr/randr.c                 |    4 ++++
 3 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 1dbb96ae48f1fa69752e71f25f03d2f733918ffb
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Fri Jul 9 12:14:50 2021 +0200

    Bump version for the Xwayland 21.1.2 release

diff --git a/meson.build b/meson.build
index 15a531f74..6d0cdf069 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@ project('xwayland', 'c',
             'buildtype=debugoptimized',
             'c_std=gnu99',
         ],
-        version: '21.1.1.901',
+        version: '21.1.2',
         meson_version: '>= 0.46.0',
 )
 add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
commit b42c33b6ef6ab23ba0f5cd5f2b858043d8d39a62
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Fri Jul 9 12:10:54 2021 +0200

    xwayland: Call RRTellChanged if the RandR configuration may have changed
    
    This makes sure RandR events are sent to interested clients as needed.
    This was happening implicitly in some cases, but not in others, e.g. if
    the root window size didn't change.
    
    If this were to call RRTellChanged more often than necessary in some
    cases, that should be harmless, as it only sends events if something
    has actually changed since last time.
    
    Should fix https://bugzilla.redhat.com/show_bug.cgi?id=1979892 .
    
    v2:
    * Call RRTellChanged at the very end of update_screen_size, just in
      case.
    
    Reviewed-by: Olivier Fourdan <ofourdan at redhat.com>
    (cherry picked from commit 204f10c29e0f323e7829ecf48e0f002be96e194d)

diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index d4634467d..52c505057 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -216,6 +216,8 @@ update_screen_size(struct xwl_output *xwl_output, int width, int height)
     }
 
     update_desktop_dimensions();
+
+    RRTellChanged(xwl_screen->screen);
 }
 
 struct xwl_emulated_mode *
@@ -674,6 +676,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id)
     RRCrtcGammaSetSize(xwl_output->randr_crtc, 256);
     RROutputSetCrtcs(xwl_output->randr_output, &xwl_output->randr_crtc, 1);
     RROutputSetConnection(xwl_output->randr_output, RR_Connected);
+    RRTellChanged(xwl_screen->screen);
 
     /* We want the output to be in the list as soon as created so we can
      * use it when binding to the xdg-output protocol...
@@ -717,6 +720,7 @@ xwl_output_remove(struct xwl_output *xwl_output)
 
     RRCrtcDestroy(xwl_output->randr_crtc);
     RROutputDestroy(xwl_output->randr_output);
+    RRTellChanged(xwl_screen->screen);
 
     xwl_output_destroy(xwl_output);
 }
commit 96829a7b19f0dbc3f1c50f968e64503c942013ad
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Fri Jul 9 12:10:27 2021 +0200

    randr: Bail from RRTellChanged if there's no root window yet
    
    This can happen if RRTellChanged is called during initialization.
    
    Continuing in that case makes no sense conceptually:
    
    * Any event sent over the wire requires a corresponding window.
    * No root window probably means there can't be any clients which could
      receive the events.
    
    In practice, it would result in a crash down the road due to
    dereferencing the NULL ScreenRec::root pointer.
    
    Reviewed-by: Olivier Fourdan <ofourdan at redhat.com>
    (cherry picked from commit a6d178b6af4bb4cd7ba28299c3ddd9d90bcbaaa5)

diff --git a/randr/randr.c b/randr/randr.c
index a4f519888..3f94c2f6c 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -615,6 +615,10 @@ RRTellChanged(ScreenPtr pScreen)
         primarysp = pScrPriv;
     }
 
+    /* If there's no root window yet, can't send events */
+    if (!primary->root)
+        return;
+
     xorg_list_for_each_entry(iter, &primary->secondary_list, secondary_head) {
         pSecondaryScrPriv = rrGetScrPriv(iter);
 


More information about the xorg-commit mailing list