summaryrefslogtreecommitdiff
path: root/redo/window_darwin.m
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-22 17:45:29 -0400
committerPietro Gagliardi <[email protected]>2014-07-22 17:45:29 -0400
commite9c6d96d2da8311969870335850bd88ec899e813 (patch)
tree5c6e1d8a6eeb456b6c2788cf9d671c083c9ae635 /redo/window_darwin.m
parente989c953fa683c56d9214e24c9f1fd22027afa9c (diff)
Added provisions for proper window redraw on Window.SetParent() and implemented them on Mac OS X; still untested.
Diffstat (limited to 'redo/window_darwin.m')
-rw-r--r--redo/window_darwin.m14
1 files changed, 10 insertions, 4 deletions
diff --git a/redo/window_darwin.m b/redo/window_darwin.m
index 4737702..18dee84 100644
--- a/redo/window_darwin.m
+++ b/redo/window_darwin.m
@@ -65,12 +65,9 @@ void windowSetTitle(id win, const char * title)
void windowShow(id win)
{
- goWindowDelegate *d;
-
[toNSWindow(win) makeKeyAndOrderFront:toNSWindow(win)];
// calling the above the first time won't emit a size changed event (unlike on Windows and GTK+), so fake one to get the controls laid out properly
- d = [toNSWindow(win) delegate];
- [d doWindowResize:win];
+ windowRedraw(win);
}
void windowHide(id win)
@@ -82,3 +79,12 @@ void windowClose(id win)
{
[toNSWindow(win) close];
}
+
+// fake a resize event under certain conditions; see each invocation for details
+void windowRedraw(id win)
+{
+ goWindowDelegate *d;
+
+ d = [toNSWindow(win) delegate];
+ [d doWindowResize:win];
+} \ No newline at end of file