Implemented the Control parent/unparent redraw provisions on the GTK+ backend.

This commit is contained in:
Pietro Gagliardi 2014-07-22 18:12:21 -04:00
parent e9c6d96d2d
commit 3b5c9738fd
1 changed files with 4 additions and 0 deletions

View File

@ -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 {