From 83a02adb5caf9e2318716261aded066f51b8c5d5 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 22 May 2015 18:36:31 +0200 Subject: [PATCH] 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. --- src/kits/interface/Button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/interface/Button.cpp b/src/kits/interface/Button.cpp index fc1dc41c8f..ce13c2d7cb 100644 --- a/src/kits/interface/Button.cpp +++ b/src/kits/interface/Button.cpp @@ -376,7 +376,7 @@ BButton::WindowActivated(bool active) void 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)) Invalidate();