From 61b3b0341856b72f235e3e2e62fc86910622b8e4 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 1 May 2014 13:13:10 -0400 Subject: [PATCH] Added comment explaining the use of -[NSWindow setContentSize:] in Mac OS X sysData.setWindowSize(). --- sysdata_darwin.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdata_darwin.go b/sysdata_darwin.go index acfe11e..db68c43 100644 --- a/sysdata_darwin.go +++ b/sysdata_darwin.go @@ -519,6 +519,7 @@ func (s *sysData) setWindowSize(width int, height int) error { ret := make(chan struct{}) defer close(ret) uitask <- func() { + // use -[NSWindow setContentSize:], which will resize the window without taking the titlebar as part of the given size and without needing us to consider the window's position (the function takes care of both for us) C.objc_msgSend_size(s.id, _setContentSize, C.int64_t(width), C.int64_t(height)) C.objc_msgSend_noargs(s.id, _display) // TODO needed?