[rhythmbox] rating: fix gtk warnings on initial realize
- From: Jonathan Matthew <jmatthew src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rhythmbox] rating: fix gtk warnings on initial realize
- Date: Sun, 31 Jan 2010 00:28:20 +0000 (UTC)
commit 881ecb0218757eb4b7ad03d5dcf696a6d3a52436
Author: Jonathan Matthew <jonathan d14n org>
Date: Sun Jan 31 10:26:27 2010 +1000
rating: fix gtk warnings on initial realize
Don't call gtk_widget_set_can_focus() until we've created the window for
the widget. With gtk+ 2.18, this queues a resize of the window, which
results in some critical errors when the window doesn't exist yet.
widgets/rb-rating.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/widgets/rb-rating.c b/widgets/rb-rating.c
index 9851333..a1fb2ef 100644
--- a/widgets/rb-rating.c
+++ b/widgets/rb-rating.c
@@ -293,7 +293,6 @@ rb_rating_realize (GtkWidget *widget)
int attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
- gtk_widget_set_can_focus (widget, TRUE);
gtk_widget_get_allocation (widget, &allocation);
@@ -313,6 +312,8 @@ rb_rating_realize (GtkWidget *widget)
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, widget);
+ gtk_widget_set_can_focus (widget, TRUE);
+
style = gtk_style_attach (gtk_widget_get_style (widget), window);
gtk_widget_set_style (widget, style);
gtk_style_set_background (style, window, GTK_STATE_ACTIVE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]