From 3b5c9738fd62e35e805d91c27170d3de8ea25ab9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 22 Jul 2014 18:12:21 -0400 Subject: [PATCH] Implemented the Control parent/unparent redraw provisions on the GTK+ backend. --- redo/controls_unix.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redo/controls_unix.go b/redo/controls_unix.go index 42068d7..bb7560f 100644 --- a/redo/controls_unix.go +++ b/redo/controls_unix.go @@ -34,6 +34,8 @@ func (w *widgetbase) unparent() { // we unref this in parent() below w.floating = true C.gtk_container_remove(w.parentw.layoutc, w.widget) + // redraw since we changed controls (by queueing a resize; thanks xxx in irc.gimp.net/#gtk+) + C.gtk_widget_queue_resize(w.parentw.layoutw) w.parentw = nil } } @@ -48,6 +50,8 @@ func (w *widgetbase) parent(win *window) { } // make sure the new widget is shown C.gtk_widget_show_all(w.widget) + // redraw since we changed controls (see above) + C.gtk_widget_queue_resize(win.layoutw) } type button struct {