[gtk+] notebook: Don't unparent tab label for drag
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: Don't unparent tab label for drag
- Date: Mon, 11 Jan 2016 16:32:10 +0000 (UTC)
commit 6d5edd18cf5637274762b7a51488d27d5bed600d
Author: Benjamin Otte <otte redhat com>
Date: Sat Jan 9 14:25:26 2016 +0100
notebook: Don't unparent tab label for drag
When a tab drag starts, we need to move the tab label into the drag
window via gtk_widget_set_parent_window().
If we don't unparent, but just unrealize the widget, we don't lose the
cssnode position.
gtk/gtknotebook.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 04455f6..426281f 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2977,9 +2977,10 @@ show_drag_window (GtkNotebook *notebook,
}
g_object_ref (page->tab_label);
- gtk_widget_unparent (page->tab_label);
+ gtk_widget_set_child_visible (page->tab_label, FALSE);
+ gtk_widget_unrealize (page->tab_label);
gtk_widget_set_parent_window (page->tab_label, priv->drag_window);
- gtk_widget_set_parent (page->tab_label, widget);
+ gtk_widget_set_child_visible (page->tab_label, TRUE);
g_object_unref (page->tab_label);
/* the grab will dissapear when the window is hidden */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]