summaryrefslogtreecommitdiff
path: root/delegate_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-02 19:16:36 -0500
committerPietro Gagliardi <[email protected]>2014-03-02 19:16:36 -0500
commit75c34a07890834aba8ec6b0cba98a36c2c663ede (patch)
tree7880f2bdf2be11a8b017a4bcd372b94f19ba4a69 /delegate_darwin.go
parent38a1b1b203fe40f455c13cbbb4cd36755e7125ed (diff)
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.
Diffstat (limited to 'delegate_darwin.go')
-rw-r--r--delegate_darwin.go3
1 files changed, 2 insertions, 1 deletions
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 {