BButton: Fix hover status glitch
A BButton didn't lose its hover status when another window partially covered it and the mouse cursor left its bounds rectangle. Check for B_EXITED_VIEW in MouseMoved to fix the problem. This fixes ticket #11962. Thanks to X512 for the analysis of the problem.
This commit is contained in:
@@ -376,7 +376,7 @@ BButton::WindowActivated(bool active)
|
|||||||
void
|
void
|
||||||
BButton::MouseMoved(BPoint where, uint32 code, const BMessage* dragMessage)
|
BButton::MouseMoved(BPoint where, uint32 code, const BMessage* dragMessage)
|
||||||
{
|
{
|
||||||
bool inside = Bounds().Contains(where);
|
bool inside = (code != B_EXITED_VIEW) && Bounds().Contains(where);
|
||||||
if (_SetFlag(FLAG_INSIDE, inside))
|
if (_SetFlag(FLAG_INSIDE, inside))
|
||||||
Invalidate();
|
Invalidate();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user