[gtk+/wip/baedert/progressbar: 20/20] gtkwidget: Queue a resize on the parent when unparenting
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/progressbar: 20/20] gtkwidget: Queue a resize on the parent when unparenting
- Date: Mon, 24 Apr 2017 17:15:09 +0000 (UTC)
commit 2e97e3f2a2a046763036e624927bcc6edbb7ad89
Author: Timm Bäder <mail baedert org>
Date: Mon Apr 24 19:07:59 2017 +0200
gtkwidget: Queue a resize on the parent when unparenting
gtk_widget_set_parent (via gtk_widget_reposition_after) will queue a
resize on the parent widget automatically when adding a child widget, so
unparent should do the same
gtk/gtkwidget.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 8ce3cf3..02bb49e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4021,6 +4021,9 @@ gtk_widget_unparent (GtkWidget *widget)
priv->clip.width,
priv->clip.height);
+ if (priv->visible && _gtk_widget_get_visible (priv->parent))
+ gtk_widget_queue_resize (priv->parent);
+
/* Reset the width and height here, to force reallocation if we
* get added back to a new parent. This won't work if our new
* allocation is smaller than 1x1 and we actually want a size of 1x1...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]