summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-08-23 10:27:43 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-08-23 10:36:30 -0400
commit44023353336c9dd595022ec7eceb1f927f859d93 (patch)
treed74cf4e0b16b6124de97296eb18a4967e8c46fd8
parent53ad763042465ff3fd93422750c5689f27269c61 (diff)
downloadgtk+-44023353336c9dd595022ec7eceb1f927f859d93.tar.gz
wayland: fix filechooser crash
The size of the window can be updated before we're requested its creation on the compositor. https://bugzilla.gnome.org/show_bug.cgi?id=786673
-rw-r--r--gdk/wayland/gdkwindow-wayland.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 8af96e1bcc..1b015346bc 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -331,13 +331,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;