mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
wayland: Fix invalid cast in transient_for
This commit is contained in:
parent
7b85d1df50
commit
7e3e50729f
@ -839,16 +839,25 @@ static void
|
||||
gdk_wayland_window_sync_transient_for (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
GdkWindowImplWayland *impl_parent = GDK_WINDOW_IMPL_WAYLAND (impl->transient_for);
|
||||
struct wl_surface *transient_for_surface;
|
||||
|
||||
if (!impl->xdg_surface)
|
||||
return;
|
||||
|
||||
if (impl->transient_for)
|
||||
{
|
||||
GdkWindowImplWayland *impl_parent = GDK_WINDOW_IMPL_WAYLAND (impl->transient_for->impl);
|
||||
|
||||
/* XXX: Is this correct? */
|
||||
if (!impl_parent->surface)
|
||||
return;
|
||||
|
||||
xdg_surface_set_transient_for (impl->xdg_surface, impl_parent->surface);
|
||||
transient_for_surface = impl_parent->surface;
|
||||
}
|
||||
else
|
||||
transient_for_surface = NULL;
|
||||
|
||||
xdg_surface_set_transient_for (impl->xdg_surface, transient_for_surface);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user