[gtk+/gtk-style-context: 118/276] GtkWidget: Set screen info in GtkStyleContext.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 118/276] GtkWidget: Set screen info in GtkStyleContext.
- Date: Sat, 23 Oct 2010 19:05:01 +0000 (UTC)
commit 2af6e1442b46c71acae984dfbc73d47b0ec0ef83
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jul 3 13:20:45 2010 +0200
GtkWidget: Set screen info in GtkStyleContext.
gtk/gtkwidget.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 2fa7e82..2b01d30 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7388,6 +7388,9 @@ gtk_widget_set_parent (GtkWidget *widget,
path = gtk_widget_get_path (widget);
gtk_style_context_set_path (context, path);
gtk_widget_path_free (path);
+
+ gtk_style_context_set_screen (context,
+ gtk_widget_get_screen (widget));
}
}
@@ -7989,14 +7992,20 @@ do_screen_change (GtkWidget *widget,
{
if (old_screen != new_screen)
{
+ GtkStyleContext *context;
+
if (old_screen)
{
PangoContext *context = g_object_get_qdata (G_OBJECT (widget), quark_pango_context);
if (context)
g_object_set_qdata (G_OBJECT (widget), quark_pango_context, NULL);
}
-
+
_gtk_tooltip_hide (widget);
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_set_screen (context, new_screen);
+
g_signal_emit (widget, widget_signals[SCREEN_CHANGED], 0, old_screen);
}
}
@@ -13364,6 +13373,9 @@ gtk_widget_get_style_context (GtkWidget *widget)
path = gtk_widget_get_path (widget);
gtk_style_context_set_path (context, path);
gtk_widget_path_free (path);
+
+ gtk_style_context_set_screen (context,
+ gtk_widget_get_screen (widget));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]