Author: axeld Date: 2010-08-03 21:39:50 +0200 (Tue, 03 Aug 2010) New Revision: 37885 Changeset: http://dev.haiku-os.org/changeset/37885 Ticket: http://dev.haiku-os.org/ticket/6420 Modified: haiku/trunk/src/servers/app/Window.cpp Log: * Separate the B_WILL_ACCEPT_FIRST_CLICK window flag from the accept-first-click desktop setting, following bug #6420. * Now, only windows with the flag set have to implement their activate behaviour itself (as Tracker does), the desktop setting no longer has an influence on this. Modified: haiku/trunk/src/servers/app/Window.cpp =================================================================== --- haiku/trunk/src/servers/app/Window.cpp 2010-08-03 19:33:05 UTC (rev 37884) +++ haiku/trunk/src/servers/app/Window.cpp 2010-08-03 19:39:50 UTC (rev 37885) @@ -10,6 +10,8 @@ * Brecht Machiels <brecht@xxxxxxxxxxx> * Clemens Zeidler <haiku@xxxxxxxxxxxxxxxxxx> */ + + #include "Window.h" #include "Decorator.h" @@ -793,8 +795,8 @@ // clicking a simple View if (!IsFocus()) { - bool acceptFirstClick = desktopSettings.AcceptFirstClick() - || ((Flags() & B_WILL_ACCEPT_FIRST_CLICK) != 0); + bool acceptFirstClick + = (Flags() & B_WILL_ACCEPT_FIRST_CLICK) != 0; bool avoidFocus = (Flags() & B_AVOID_FOCUS) != 0; // Activate or focus the window in case it doesn't accept first @@ -811,7 +813,8 @@ // TODO: the latter is unlike BeOS - if we really wanted to // imitate this behaviour, we would need to check if we're // the front window instead of the focus window - if (!acceptFirstClick && !avoidFocus) + if ((!acceptFirstClick || !desktopSettings.AcceptFirstClick()) + && !avoidFocus) return; }