mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
Merge branch 'issue1214-tooltips-win32-gtk4' into 'master'
Gdk-Win32: Correct handling of transient state changes See merge request GNOME/gtk!280
This commit is contained in:
commit
ce7956cd50
@ -760,17 +760,11 @@ gdk_win32_surface_destroy (GdkSurface *window,
|
||||
_gdk_remove_modal_window (window);
|
||||
|
||||
/* Remove all our transient children */
|
||||
tmp = surface_impl->transient_children;
|
||||
while (tmp != NULL)
|
||||
while (surface_impl->transient_children != NULL)
|
||||
{
|
||||
GdkSurface *child = tmp->data;
|
||||
GdkSurfaceImplWin32 *child_impl = GDK_SURFACE_IMPL_WIN32 (GDK_SURFACE (child)->impl);
|
||||
|
||||
child_impl->transient_owner = NULL;
|
||||
tmp = tmp->next;
|
||||
GdkSurface *child = surface_impl->transient_children->data;
|
||||
gdk_surface_set_transient_for (child, NULL);
|
||||
}
|
||||
g_slist_free (surface_impl->transient_children);
|
||||
surface_impl->transient_children = NULL;
|
||||
|
||||
/* Remove ourself from our transient owner */
|
||||
if (surface_impl->transient_owner != NULL)
|
||||
@ -1672,27 +1666,29 @@ gdk_win32_surface_set_transient_for (GdkSurface *window,
|
||||
return;
|
||||
}
|
||||
|
||||
if (parent == NULL)
|
||||
if (surface_impl->transient_owner == parent)
|
||||
return;
|
||||
|
||||
if (GDK_IS_SURFACE (surface_impl->transient_owner))
|
||||
{
|
||||
GdkSurfaceImplWin32 *trans_impl = GDK_SURFACE_IMPL_WIN32 (surface_impl->transient_owner->impl);
|
||||
if (trans_impl->transient_children != NULL)
|
||||
{
|
||||
item = g_slist_find (trans_impl->transient_children, window);
|
||||
item->data = NULL;
|
||||
trans_impl->transient_children = g_slist_delete_link (trans_impl->transient_children, item);
|
||||
trans_impl->num_transients--;
|
||||
item = g_slist_find (trans_impl->transient_children, window);
|
||||
item->data = NULL;
|
||||
trans_impl->transient_children = g_slist_delete_link (trans_impl->transient_children, item);
|
||||
trans_impl->num_transients--;
|
||||
|
||||
if (!trans_impl->num_transients)
|
||||
{
|
||||
trans_impl->transient_children = NULL;
|
||||
}
|
||||
if (!trans_impl->num_transients)
|
||||
{
|
||||
trans_impl->transient_children = NULL;
|
||||
}
|
||||
|
||||
g_object_unref (G_OBJECT (surface_impl->transient_owner));
|
||||
g_object_unref (G_OBJECT (window));
|
||||
|
||||
surface_impl->transient_owner = NULL;
|
||||
}
|
||||
else
|
||||
|
||||
if (parent)
|
||||
{
|
||||
parent_impl = GDK_SURFACE_IMPL_WIN32 (parent->impl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user