mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 09:00:34 +00:00
window: Set parent context instead of just resetting style
Otherwise the inherit properties won't inherit properly.
This commit is contained in:
parent
27c9352df3
commit
e7a984b337
@ -2642,6 +2642,7 @@ void
|
||||
gtk_window_set_attached_to (GtkWindow *window,
|
||||
GtkWidget *attach_widget)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
GtkWindowPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
@ -2664,7 +2665,11 @@ gtk_window_set_attached_to (GtkWindow *window,
|
||||
}
|
||||
|
||||
/* Update the style, as the widget path might change. */
|
||||
gtk_widget_reset_style (GTK_WIDGET (window));
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (window));
|
||||
if (priv->attach_widget)
|
||||
gtk_style_context_set_parent (context, gtk_widget_get_style_context (priv->attach_widget));
|
||||
else
|
||||
gtk_style_context_set_parent (context, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user