Fixed another regression introduced in r39602: Reset the click count when a
different region has been clicked since the last click. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39610 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -492,6 +492,7 @@ DefaultWindowBehaviour::DefaultWindowBehaviour(Window* window)
|
||||
fState(NULL),
|
||||
fLastModifiers(0),
|
||||
fLastMouseButtons(0),
|
||||
fLastRegion(REGION_NONE),
|
||||
fResetClickCount(0)
|
||||
{
|
||||
}
|
||||
@@ -620,6 +621,16 @@ DefaultWindowBehaviour::MouseDown(BMessage* message, BPoint where)
|
||||
}
|
||||
}
|
||||
|
||||
// The hit region changed since the last the click. Reset the click count.
|
||||
if (hitRegion != fLastRegion) {
|
||||
fLastRegion = hitRegion;
|
||||
clickCount = 1;
|
||||
|
||||
fResetClickCount = message->FindInt32("clicks") - 1;
|
||||
if (fResetClickCount < 0)
|
||||
fResetClickCount = 0;
|
||||
}
|
||||
|
||||
if (action == CLICK_NONE) {
|
||||
// No action -- if this is a click inside the window's contents,
|
||||
// let it be forwarded to the window.
|
||||
|
||||
@@ -75,6 +75,7 @@ protected:
|
||||
State* fState;
|
||||
int32 fLastModifiers;
|
||||
int32 fLastMouseButtons;
|
||||
Region fLastRegion;
|
||||
int32 fResetClickCount;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user