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.

This commit is contained in:
Pietro Gagliardi 2014-03-02 19:16:36 -05:00
parent 38a1b1b203
commit 75c34a0789
1 changed files with 2 additions and 1 deletions

View File

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