From 4a68c3cb7a984d144378c683e7587dadd5ebe62f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 25 Jun 2014 23:44:22 -0400 Subject: Applied the new control sizing system to the GTK+ backend. --- callbacks_unix.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'callbacks_unix.go') diff --git a/callbacks_unix.go b/callbacks_unix.go index f66be7c..ff3e3b9 100644 --- a/callbacks_unix.go +++ b/callbacks_unix.go @@ -37,10 +37,10 @@ var window_delete_event_callback = C.GCallback(C.our_window_delete_event_callbac func our_window_configure_event_callback(widget *C.GtkWidget, event *C.GdkEvent, what C.gpointer) C.gboolean { // called when the window is resized s := (*sysData)(unsafe.Pointer(what)) - if s.container != nil && s.resize != nil { // wait for init + if s.container != nil && s.allocate != nil { // wait for init width, height := gtk_window_get_size(s.widget) - // top-left is (0,0) so no need for winheight - s.doResize(0, 0, width, height, 0) + // top-left is (0,0) here + s.resizeWindow(width, height) } // no need to manually redraw everything: since we use gtk_widget_set_size_request(), that queues both resize and redraw for us (thanks Company in irc.gimp.net/#gtk+) return C.FALSE // continue the event chain -- cgit v1.2.3