[libwnck] pager: Do not call gtk_widget_queue_resize() in size_allocate() handler
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] pager: Do not call gtk_widget_queue_resize() in size_allocate() handler
- Date: Thu, 3 Feb 2011 14:11:29 +0000 (UTC)
commit 6e328ad5ed48878ee5993054e5ba6aa44a656893
Author: Vincent Untz <vuntz gnome org>
Date: Thu Feb 3 14:58:02 2011 +0100
pager: Do not call gtk_widget_queue_resize() in size_allocate() handler
It's not allowed to do so. However we know when we want to do this, so
add an idle function to do later when it's needed.
libwnck/pager.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libwnck/pager.c b/libwnck/pager.c
index bfab525..025c401 100644
--- a/libwnck/pager.c
+++ b/libwnck/pager.c
@@ -730,6 +730,13 @@ wnck_pager_get_preferred_height_for_width (GtkWidget *widget,
*natural_height = *minimum_height = height;
}
+static gboolean
+_wnck_pager_queue_resize (gpointer data)
+{
+ gtk_widget_queue_resize (GTK_WIDGET (data));
+ return FALSE;
+}
+
static void
wnck_pager_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
@@ -785,7 +792,7 @@ wnck_pager_size_allocate (GtkWidget *widget,
if (workspace_size != pager->priv->workspace_size)
{
pager->priv->workspace_size = workspace_size;
- gtk_widget_queue_resize (GTK_WIDGET (widget));
+ g_idle_add (_wnck_pager_queue_resize, pager);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]