summaryrefslogtreecommitdiff
path: root/redo/controls_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/controls_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/controls_darwin.m')
-rw-r--r--redo/controls_darwin.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/redo/controls_darwin.m b/redo/controls_darwin.m
index e1cdb8f..5233129 100644
--- a/redo/controls_darwin.m
+++ b/redo/controls_darwin.m
@@ -11,8 +11,13 @@
void unparent(id control)
{
+ NSWindow *old;
+
[toNSView(control) retain]; // save from being freed when released by the removal selector below
+ old = [toNSView(control) window];
[toNSView(control) removeFromSuperview];
+ // redraw since we changed controls
+ windowRedraw((id) old);
}
void parent(id control, id parentid, BOOL floating)
@@ -20,6 +25,8 @@ void parent(id control, id parentid, BOOL floating)
[[toNSWindow(parentid) contentView] addSubview:toNSView(control)];
if (floating) // previously unparented
[toNSView(control) release];
+ // redraw since we changed controls
+ windowRedraw(parentid);
}
static inline void setStandardControlFont(id control)