xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Fri Jul 15 14:04:18 UTC 2016


 hw/xwayland/xwayland-output.c |   17 +++++++++--------
 hw/xwayland/xwayland.h        |    2 +-
 2 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit cf6730c503f8090a5d1b80918fe253fc2c5bc090
Author: Rui Matos <tiagomatos at gmail.com>
Date:   Wed Jul 13 19:19:09 2016 +0200

    xwayland: Update RR state on wl_output.done instead of wl_output.mode
    
    Otherwise if the geometry changes but the mode doesn't we end up with
    the previous geometry from RR's point of view.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=768710
    
    Reviewed-by: Jonas Ã…dahl <jadahl at gmail.com>
    Signed-off-by: Rui Matos <tiagomatos at gmail.com>

diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 130b31d..39b93dc 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -98,7 +98,6 @@ output_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags,
                    int width, int height, int refresh)
 {
     struct xwl_output *xwl_output = data;
-    RRModePtr randr_mode;
 
     if (!(flags & WL_OUTPUT_MODE_CURRENT))
         return;
@@ -111,13 +110,7 @@ output_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags,
         xwl_output->height = width;
     }
 
-    randr_mode = xwayland_cvt(width, height, refresh / 1000.0, 0, 0);
-
-    RROutputSetModes(xwl_output->randr_output, &randr_mode, 1, 1);
-
-    RRCrtcNotify(xwl_output->randr_crtc, randr_mode,
-                 xwl_output->x, xwl_output->y,
-                 xwl_output->rotation, NULL, 1, &xwl_output->randr_output);
+    xwl_output->refresh = refresh;
 }
 
 static inline void
@@ -198,6 +191,14 @@ output_handle_done(void *data, struct wl_output *wl_output)
     struct xwl_output *it, *xwl_output = data;
     struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
     int width = 0, height = 0, has_this_output = 0;
+    RRModePtr randr_mode;
+
+    randr_mode = xwayland_cvt(xwl_output->width, xwl_output->height,
+                              xwl_output->refresh / 1000.0, 0, 0);
+    RROutputSetModes(xwl_output->randr_output, &randr_mode, 1, 1);
+    RRCrtcNotify(xwl_output->randr_crtc, randr_mode,
+                 xwl_output->x, xwl_output->y,
+                 xwl_output->rotation, NULL, 1, &xwl_output->randr_output);
 
     xorg_list_for_each_entry(it, &xwl_screen->output_list, link) {
         /* output done event is sent even when some property
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index b8a58e7..aaaa431 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -149,7 +149,7 @@ struct xwl_output {
     struct xwl_screen *xwl_screen;
     RROutputPtr randr_output;
     RRCrtcPtr randr_crtc;
-    int32_t x, y, width, height;
+    int32_t x, y, width, height, refresh;
     Rotation rotation;
 };
 


More information about the xorg-commit mailing list