[gtk+/gtk-style-context: 118/540] 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/540] GtkWidget: Set screen info in GtkStyleContext.
- Date: Fri, 3 Dec 2010 02:45:59 +0000 (UTC)
commit ab1a73359b3bdad8b6a257fab51c0257f114b0b7
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jul 3 13:20:45 2010 +0200
GtkWidget: Set screen info in GtkStyleContext.
gtk/gtkwidget.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3235f5c..24cb380 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7294,6 +7294,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));
}
}
@@ -7895,6 +7898,8 @@ 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);
@@ -7903,6 +7908,10 @@ do_screen_change (GtkWidget *widget,
}
_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);
}
}
@@ -13283,6 +13292,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]