From 05e3d0e5cc4211d408210e4ef3969a1446f9c0fb Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Wed, 9 Oct 2013 16:30:53 -0500 Subject: [PATCH] winemac: Make sure the same housekeeping is done when closing a window as is done when hiding it. --- dlls/winemac.drv/cocoa_window.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index a48b691ab2c..7371cbc9f2f 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -1801,8 +1801,11 @@ void macdrv_destroy_cocoa_window(macdrv_window w) NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; WineWindow* window = (WineWindow*)w; + OnMainThread(^{ + [window doOrderOut]; + [window close]; + }); [window.queue discardEventsMatchingMask:-1 forWindow:window]; - [window close]; [window release]; [pool release];