[gtk+/gtk-3-10] expander: Call set_realized() later
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-10] expander: Call set_realized() later
- Date: Sun, 6 Apr 2014 03:43:48 +0000 (UTC)
commit 6c9d0e1773f691b8e83289454486a26d2c42dc19
Author: Benjamin Otte <otte redhat com>
Date: Thu Mar 20 14:11:02 2014 +0100
expander: Call set_realized() later
Widgets should only call set_realized() after having created and
registered their GDK windows. In this case, the creation of the style
context (or more exactly: figuring out the scale factor for it) requires
knowing if the widget is already realized. Which it isn't.
https://bugzilla.gnome.org/show_bug.cgi?id=726717
gtk/gtkexpander.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index f725b05..e6f861f 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -536,8 +536,6 @@ gtk_expander_realize (GtkWidget *widget)
priv = GTK_EXPANDER (widget)->priv;
- gtk_widget_set_realized (widget, TRUE);
-
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
get_expander_bounds (GTK_EXPANDER (widget), &expander_rect);
@@ -576,6 +574,8 @@ gtk_expander_realize (GtkWidget *widget)
priv->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_register_window (widget, priv->event_window);
+
+ gtk_widget_set_realized (widget, TRUE);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]