From 0e505c0c7bd8bb6a815daee1dbd76dcc563dae9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 3 Aug 2010 19:39:50 +0000 Subject: [PATCH] * 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 --- src/servers/app/Window.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/servers/app/Window.cpp b/src/servers/app/Window.cpp index 693337db4b..8f703124f6 100644 --- a/src/servers/app/Window.cpp +++ b/src/servers/app/Window.cpp @@ -10,6 +10,8 @@ * Brecht Machiels * Clemens Zeidler */ + + #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; }