From cf060b4c7d9d3c765a3e5610bb2a8bce96a6f21e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 8 Apr 2020 11:40:10 +0200 Subject: [PATCH] wayland: Move warning about transient-less temporaries to map() We shouldn't warn in a funtion that seemingly only checks how something eventually should be mapped. Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2589 --- gdk/wayland/gdkwindow-wayland.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 30d4353826..7a89ece98d 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -2955,10 +2955,6 @@ should_map_as_popup (GdkWindow *window) if (impl->grab_input_seat) return TRUE; } - else - g_message ("Window %p is a temporary window without parent, " - "application will not be able to position it on screen.", - window); } /* Yet we need to keep the window type hint tests for compatibility */ @@ -3043,6 +3039,16 @@ gdk_wayland_window_map (GdkWindow *window) if (impl->mapped || impl->use_custom_surface) return; + if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP) + { + if (!impl->transient_for) + { + g_message ("Window %p is a temporary window without parent, " + "application will not be able to position it on screen.", + window); + } + } + if (should_map_as_subsurface (window)) { if (impl->transient_for)