From 38a1b1b203fe40f455c13cbbb4cd36755e7125ed Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 2 Mar 2014 19:13:26 -0500 Subject: [PATCH] Fixed incorrect redrawing of Mac OS X windows after resize. Still need to fix the wrong rect issues... --- delegate_darwin.go | 2 ++ todo.md | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/delegate_darwin.go b/delegate_darwin.go index 5c33e39..60c0301 100644 --- a/delegate_darwin.go +++ b/delegate_darwin.go @@ -78,6 +78,7 @@ func appDelegate_windowShouldClose(self C.id, sel C.SEL, win C.id) C.BOOL { var ( _object = sel_getUid("object") + _display = sel_getUid("display") ) //export appDelegate_windowDidResize @@ -91,6 +92,7 @@ func appDelegate_windowDidResize(self C.id, sel C.SEL, notification C.id) { panic("child resize failed: " + err.Error()) } } + C.objc_msgSend_noargs(win, _display) // redraw everything; TODO only if resize() was called? } //export appDelegate_buttonClicked diff --git a/todo.md b/todo.md index 53b479d..5448f08 100644 --- a/todo.md +++ b/todo.md @@ -27,7 +27,6 @@ important things: - because the main event loop is not called if initialization fails, it is presently impossible for MsgBoxError() to work if UI initialization fails; this basically means we cannot allow initializiation to fail on Mac OS X if we want to be able to report UI init failures to the user with one - Cocoa coordinates have (0,0) at the bottom left: need to fix this somehow - I think Cocoa NSButton text is not vertically aligned properly...? -- resizing Cocoa windows does not redraw controls correctly - NSComboBox scans the entered text to see if it matches one of the items and returns the index of that item if it does; find out how to suppress this so that it returns -1 unless the item was chosen from the list (like the other platforms) - figure out what to do about deleting a nonexistent item; each backend responds differently by default - there's no GTK+ error handling whatsoever; we need to figure out how it works