* 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.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37885 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2010-08-03 19:39:50 +00:00
parent 7aa2819c12
commit 0e505c0c7b
1 changed files with 6 additions and 3 deletions

View File

@ -10,6 +10,8 @@
* Brecht Machiels <brecht@mos6581.org>
* Clemens Zeidler <haiku@clemens-zeidler.de>
*/
#include "Window.h"
#include "Decorator.h"
@ -793,8 +795,8 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
// 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 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
// 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;
}