libgimpwidgets: slightly better form.

Previous code was right and equivalent because
gdk_wayland_window_export_handle() works asynchronously in the same
thread (so phandle can't get overridden by mistake). Nevertheless a
quick code scan felt surprising, so to avoid any such future surprise,
let's just switch the order of statements.
This commit is contained in:
Jehan 2025-03-23 18:10:25 +01:00
parent bb6b2e395f
commit 0e7c4fec14

View file

@ -1362,6 +1362,9 @@ gimp_widget_set_handle_on_mapped (GtkWidget *widget,
handle = g_bytes_new (&id, sizeof (Window)); handle = g_bytes_new (&id, sizeof (Window));
} }
#endif #endif
*phandle = handle;
#ifdef GDK_WINDOWING_WAYLAND #ifdef GDK_WINDOWING_WAYLAND
if (GDK_IS_WAYLAND_WINDOW (surface)) if (GDK_IS_WAYLAND_WINDOW (surface))
{ {
@ -1379,7 +1382,5 @@ gimp_widget_set_handle_on_mapped (GtkWidget *widget,
} }
#endif #endif
*phandle = handle;
return FALSE; return FALSE;
} }