Commit 887db340 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

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 9fbc364e but adds some conditions around the call to avoid the flicker on platforms where it's unnecessary. Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b1861cb8
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment