diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 4b651d7..3114ba6 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -714,7 +714,7 @@ gdk_wayland_window_show (GdkWindow *window, gboolean already_mapped)
       wl_surface_set_user_data(impl->surface, window);
     }

-  if (!impl->use_custom_surface && display_wayland->shell)
+  if (!impl->use_custom_surface && display_wayland->shell && !impl->shell_surface)
     {
       impl->shell_surface = wl_shell_get_shell_surface (display_wayland->shell,
                                                         impl->surface);
 