winemac: Call -removeFromSuperview on a view before adding it to a superview, on 10.9 and earlier.
This works around a Cocoa bug that causes an exception and hang if the view is
being re-ordered within its current superview (as opposed to being moved to a
new superview).
This reverts commit 9fbc364ea1
but adds some
conditions around the call to avoid the flicker on platforms where it's
unnecessary.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b1861cb86c
commit
887db3403e
|
@ -3357,6 +3357,10 @@ void macdrv_set_view_superview(macdrv_view v, macdrv_view s, macdrv_window w, ma
|
|||
WineWindow* oldWindow = (WineWindow*)[view window];
|
||||
WineWindow* newWindow = (WineWindow*)[superview window];
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_10) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10
|
||||
if (floor(NSAppKitVersionNumber) <= 1265 /*NSAppKitVersionNumber10_9*/)
|
||||
[view removeFromSuperview];
|
||||
#endif
|
||||
if (prev)
|
||||
[superview addSubview:view positioned:NSWindowBelow relativeTo:prev];
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue