[gtk+/gtk-3-22] gdk: wayland: always set buffer scale on size update



commit 12d10f239b1caa48f2f5ae903f955c92a9abf20d
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Fri Aug 18 23:57:56 2017 +0100

    gdk: wayland: always set buffer scale on size update
    
    We're only updating this when we have an EGL window. This means we
    have the wrong scaling factor when using Vulkan.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786492

 gdk/wayland/gdkwindow-wayland.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index c6ebe53..cde31e3 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -342,13 +342,9 @@ gdk_wayland_window_update_size (GdkWindow *window,
   impl->scale = scale;
 
   if (impl->display_server.egl_window)
-    {
-      wl_egl_window_resize (impl->display_server.egl_window,
-                            width * scale,
-                            height * scale,
-                            0, 0);
-      wl_surface_set_buffer_scale (impl->display_server.wl_surface, scale);
-    }
+    wl_egl_window_resize (impl->display_server.egl_window, width * scale, height * scale, 0, 0);
+  if (impl->display_server.wl_surface)
+    wl_surface_set_buffer_scale (impl->display_server.wl_surface, scale);
 
   area.x = 0;
   area.y = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]