From ef4f1b553391ba664a1ef6a287b1afc6039f4f61 Mon Sep 17 00:00:00 2001 From: stippi Date: Mon, 3 May 2010 11:02:05 +0000 Subject: [PATCH] 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 --- src/apps/webpositive/tabview/TabContainerView.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/apps/webpositive/tabview/TabContainerView.cpp b/src/apps/webpositive/tabview/TabContainerView.cpp index 6f502b2850..70badaf3d1 100644 --- a/src/apps/webpositive/tabview/TabContainerView.cpp +++ b/src/apps/webpositive/tabview/TabContainerView.cpp @@ -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(); }