# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1301956842 0 # Node ID 13debcad9757d14803c09ce6c7df5fbea4ccf48b # Parent b15ad609365e82f7ec68aa24ce5db47ee4f24431 Another test fix at reported crash in dw_window_default(). Also committed a change in compat when garbage collection is used. diff -r b15ad609365e -r 13debcad9757 compat.c --- a/compat.c Mon Apr 04 05:49:45 2011 +0000 +++ b/compat.c Mon Apr 04 22:40:42 2011 +0000 @@ -42,7 +42,7 @@ nanosleep(&req, NULL); #else usleep(period * 1000); -#ifdef __MAC__ +#if defined(__MAC__) && !defined(GARBAGE_COLLECT) _dw_pool_drain(); #endif #endif diff -r b15ad609365e -r 13debcad9757 mac/dw.m --- a/mac/dw.m Mon Apr 04 05:49:45 2011 +0000 +++ b/mac/dw.m Mon Apr 04 22:40:42 2011 +0000 @@ -6577,8 +6577,9 @@ void API dw_window_default(HWND handle, HWND defaultitem) { NSWindow *window = handle; + id object = defaultitem; - if([window isKindOfClass:[NSWindow class]] && defaultitem) + if([window isKindOfClass:[NSWindow class]] && [object isKindOfClass:[NSControl class]]) { [window setInitialFirstResponder:defaultitem]; }