diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-05-11 22:13:07 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-05-11 22:13:07 -0400 |
commit | 62b858cf0f74b44133a77d0e99c497cabc1a2ab0 (patch) | |
tree | 02cd9da9c3679ce9ef3d3f6facc041f86dbf3e24 | |
parent | 6663257bf000384fc1ff2ca470fe5bccad6029b0 (diff) | |
download | gtk+-62b858cf0f74b44133a77d0e99c497cabc1a2ab0.tar.gz |
Avoid a critical under weston
The ordering of globals in connection setup under weston
is different from mutter, and we end up creating a the
dnd window before any outputs are present. Don't cause
a critical warning in that case.
-rw-r--r-- | gdk/wayland/gdkwindow-wayland.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index a4e1df436e..507013c5d5 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -495,7 +495,8 @@ _gdk_wayland_display_create_window_impl (GdkDisplay *display, g_object_ref (window); /* More likely to be right than just assuming 1 */ - if (wayland_display->compositor_version >= WL_SURFACE_HAS_BUFFER_SCALE) + if (wayland_display->compositor_version >= WL_SURFACE_HAS_BUFFER_SCALE && + gdk_screen_get_n_monitors (screen) > 0) impl->scale = gdk_screen_get_monitor_scale_factor (screen, 0); impl->title = NULL; |