Fix a differnace to Cocoa and warn about another one.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28135 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2009-03-26 22:37:47 +00:00
parent 7f7914ef97
commit 05cdcc9d76
3 changed files with 17 additions and 3 deletions

View file

@ -2634,6 +2634,8 @@ in the main thread.
NSNumber *n = [[NSNumber alloc] initWithBool: flag];
if (GSCurrentThread() != GSAppKitThread)
{
NSDebugMLLog (@"MacOSXCompatibility",
@"setNeedsDisplay: called on secondary thread");
[self performSelectorOnMainThread: @selector(_setNeedsDisplay_real:)
withObject: n
waitUntilDone: NO];
@ -2702,11 +2704,14 @@ in the main thread.
NSValue *v = [[NSValue alloc]
initWithBytes: &invalidRect
objCType: @encode(NSRect)];
if (GSCurrentThread() != GSAppKitThread)
{
NSDebugMLLog (@"MacOSXCompatibility",
@"setNeedsDisplayInRect: called on secondary thread");
[self performSelectorOnMainThread: @selector(_setNeedsDisplayInRect_real:)
withObject: v
waitUntilDone: NO];
withObject: v
waitUntilDone: NO];
}
else
{