* B_AVOID_FOCUS windows never got mouse clicks. This fixes bug #1652.
* Our behaviour differs a bit from how BeOS handles those windows, added a comment to the code which explains that, and how we could change it if we really wanted to. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23705 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ea0331c6f9
commit
2d0687ae9e
@ -820,6 +820,7 @@ WindowLayer::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// click was inside the window contents
|
||||
if (ViewLayer* view = ViewAt(where)) {
|
||||
if (HasModal())
|
||||
return;
|
||||
@ -834,9 +835,14 @@ WindowLayer::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
||||
&& desktopSettings.MouseMode() == B_NORMAL_MOUSE)
|
||||
fDesktop->ActivateWindow(this);
|
||||
|
||||
// eat the click if we don't accept first click
|
||||
if ((Flags() & B_WILL_ACCEPT_FIRST_CLICK) == 0
|
||||
|| (Flags() & B_AVOID_FOCUS) != 0)
|
||||
// Eat the click if we don't accept first click
|
||||
// (B_AVOID_FOCUS never gets the focus, so they always accept
|
||||
// the first click)
|
||||
// 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 ((Flags() & (B_WILL_ACCEPT_FIRST_CLICK
|
||||
| B_AVOID_FOCUS)) == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user