* 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:
@@ -10,6 +10,8 @@
|
|||||||
* Brecht Machiels <[email protected]>
|
* Brecht Machiels <[email protected]>
|
||||||
* Clemens Zeidler <[email protected]>
|
* Clemens Zeidler <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Window.h"
|
#include "Window.h"
|
||||||
|
|
||||||
#include "Decorator.h"
|
#include "Decorator.h"
|
||||||
@@ -793,8 +795,8 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
|||||||
|
|
||||||
// clicking a simple View
|
// clicking a simple View
|
||||||
if (!IsFocus()) {
|
if (!IsFocus()) {
|
||||||
bool acceptFirstClick = desktopSettings.AcceptFirstClick()
|
bool acceptFirstClick
|
||||||
|| ((Flags() & B_WILL_ACCEPT_FIRST_CLICK) != 0);
|
= (Flags() & B_WILL_ACCEPT_FIRST_CLICK) != 0;
|
||||||
bool avoidFocus = (Flags() & B_AVOID_FOCUS) != 0;
|
bool avoidFocus = (Flags() & B_AVOID_FOCUS) != 0;
|
||||||
|
|
||||||
// Activate or focus the window in case it doesn't accept first
|
// 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
|
// TODO: the latter is unlike BeOS - if we really wanted to
|
||||||
// imitate this behaviour, we would need to check if we're
|
// imitate this behaviour, we would need to check if we're
|
||||||
// the front window instead of the focus window
|
// the front window instead of the focus window
|
||||||
if (!acceptFirstClick && !avoidFocus)
|
if ((!acceptFirstClick || !desktopSettings.AcceptFirstClick())
|
||||||
|
&& !avoidFocus)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user