Since fLastMouseEventTab is never updated in _MouseMoved() while fMouseDown is

true, we need to recheck it in MouseUp(). This would fix the problem with the
middle mouse button click to close tabs if we didn't move closing to the mouse
up event, and it also fixes other situations, like clicking on one tab, moving
the mouse over another tab's close button, releasing the mouse and clicking
again without moving it inbetween.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@471 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi 2010-05-03 11:02:05 +00:00 committed by Alexandre Deckner
parent 06ea485752
commit ef4f1b5533
1 changed files with 7 additions and 0 deletions

View File

@ -151,9 +151,16 @@ TabContainerView::MouseUp(BPoint where)
if (fLastMouseEventTab)
fLastMouseEventTab->MouseUp(where);
else if (fClickCount > 1) {
// NOTE: fClickCount is >= 1 only if the first click was outside
// any tab. So even if fLastMouseEventTab has been reset to NULL
// because this tab was removed during mouse down, we wouldn't
// run the "outside tabs" code below.
fClickCount = 0;
fController->DoubleClickOutsideTabs();
}
// Always check the tab under the mouse again, since we don't update
// it with fMouseDown == true.
_SendFakeMouseMoved();
}