diff --git a/ChangeLog b/ChangeLog index 2328e4355..73548c440 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * Source/NSWindow.m (-undoManager, -dealloc): Create an undo manager for a window when necessary. + * Source/NSWindow.m (-sendEvent:): Don't activate an application + upon a single click into a miniwindow. + 2009-01-16 12:04-EST Gregory John Casamento * Source/NSMenuItem.m: Retain the GSMenuSeparator instance if diff --git a/Source/NSWindow.m b/Source/NSWindow.m index f4ea97ecc..77243aef8 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -3530,8 +3530,14 @@ resetCursorRectsForView(NSView *theView) } } /* Activate the app *after* making the receiver key, as app - activation tries to make the previous key window key. */ - if ([NSApp isActive] == NO && self != [NSApp iconWindow]) + activation tries to make the previous key window key. + However, don't activate the app after a single click into + the app icon or a miniwindow. This allows dragging app + icons and miniwindows without unnecessarily switching + applications (cf. Sect. 4 of the OpenStep UI Guidelines). + */ + if ((_styleMask & (NSIconWindowMask | NSMiniWindowMask)) == 0 + && [NSApp isActive] == NO) { v = nil; [NSApp activateIgnoringOtherApps: YES];