summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-01 13:13:10 -0400
committerPietro Gagliardi <[email protected]>2014-05-01 13:13:10 -0400
commit61b3b0341856b72f235e3e2e62fc86910622b8e4 (patch)
tree3f4105e07564282ddfa37a37a8e8e9b342b8c671
parent3af89507ca43f349af98afc38c8961cdb8a66fdc (diff)
Added comment explaining the use of -[NSWindow setContentSize:] in Mac OS X sysData.setWindowSize().
-rw-r--r--sysdata_darwin.go1
1 files changed, 1 insertions, 0 deletions
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?