gdk: wayland: always set buffer scale on size update
authorLionel Landwerlin <llandwerlin@gmail.com>
Fri, 18 Aug 2017 22:57:56 +0000 (23:57 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 23 Aug 2017 14:44:20 +0000 (10:44 -0400)
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

index c6ebe53ce9b0654b280395700a3daccf0040fc44..cde31e37780a170b3e3a7e6a7ebda5825a36db7b 100644 (file)
@@ -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;