From 75c34a07890834aba8ec6b0cba98a36c2c663ede Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 2 Mar 2014 19:16:36 -0500 Subject: [PATCH] Fixed incorrect object placement by using the window's content rect, not the window's frame, to define the window size. The coordinate system being flipped is still not fixed. --- delegate_darwin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/delegate_darwin.go b/delegate_darwin.go index 60c0301..897cc28 100644 --- a/delegate_darwin.go +++ b/delegate_darwin.go @@ -85,7 +85,8 @@ var ( func appDelegate_windowDidResize(self C.id, sel C.SEL, notification C.id) { win := C.objc_msgSend_noargs(notification, _object) sysData := getSysData(win) - r := C.objc_msgSend_stret_rect_noargs(win, _frame) + wincv := C.objc_msgSend_noargs(win, _contentView) // we want the content view's size, not the window's; selector defined in sysdata_darwin.go + r := C.objc_msgSend_stret_rect_noargs(wincv, _frame) if sysData.resize != nil { err := sysData.resize(int(r.x), int(r.y), int(r.width), int(r.height)) if err != nil {