mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 06:40:08 +00:00
Merge branch 'warn-show-destoyed-window' into 'main'
Show a warning when a destroyed window is shown See merge request GNOME/gtk!5122
This commit is contained in:
commit
d8796b3075
@ -3828,6 +3828,9 @@ gtk_window_show (GtkWidget *widget)
|
|||||||
GtkWindow *window = GTK_WINDOW (widget);
|
GtkWindow *window = GTK_WINDOW (widget);
|
||||||
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
|
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
|
||||||
|
|
||||||
|
if (!g_list_store_find (toplevel_list, window, NULL))
|
||||||
|
g_warning ("A window is shown after it has been destroyed. This will leave the window in an inconsistent state.");
|
||||||
|
|
||||||
_gtk_widget_set_visible_flag (widget, TRUE);
|
_gtk_widget_set_visible_flag (widget, TRUE);
|
||||||
|
|
||||||
gtk_css_node_validate (gtk_widget_get_css_node (widget));
|
gtk_css_node_validate (gtk_widget_get_css_node (widget));
|
||||||
|
Loading…
Reference in New Issue
Block a user