summaryrefslogtreecommitdiff
path: root/gtk/gtkwindow.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-05-01 22:41:20 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-05-01 23:05:09 +0000
commit33a8108f199e659a1596324e0daf2b866d55c495 (patch)
tree917f5ee91a77a4adf30ff1e52e07d8237911d3d6 /gtk/gtkwindow.c
parent78d254370c5240b76d320f8ceb374da153843926 (diff)
downloadgtk+-33a8108f199e659a1596324e0daf2b866d55c495.tar.gz
window: Implement display change via root/unroot
Export gtk_widget_root/unroot privately, make them work on roots, and use them in gtk_window_set_display. This gets us to a single way to listen for display changes, the root property.
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r--gtk/gtkwindow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index bdff204913..de59910b0c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -8510,7 +8510,9 @@ gtk_window_set_display (GtkWindow *window,
G_CALLBACK (gtk_window_on_theme_variant_changed), window);
#endif
- _gtk_widget_propagate_display_changed (widget, previous_display);
+ gtk_widget_unroot (widget);
+ gtk_widget_root (widget);
+
g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_DISPLAY]);
if (was_mapped)