[haiku-webkit-commits] r471 - webkit/trunk/WebKit/haiku/WebPositive/tabview

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Mon, 03 May 2010 11:02:05 +0000

Author: stippi
Date: Mon May  3 11:02:05 2010
New Revision: 471
URL: http://mmlr.dyndns.org/changeset/471

Log:
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.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/tabview/TabContainerView.cpp

Modified: webkit/trunk/WebKit/haiku/WebPositive/tabview/TabContainerView.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/tabview/TabContainerView.cpp  Sat May 
 1 19:20:53 2010        (r470)
+++ webkit/trunk/WebKit/haiku/WebPositive/tabview/TabContainerView.cpp  Mon May 
 3 11:02:05 2010        (r471)
@@ -151,9 +151,16 @@
        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();
 }
 
 

Other related posts:

  • » [haiku-webkit-commits] r471 - webkit/trunk/WebKit/haiku/WebPositive/tabview - webkit