зеркало из https://github.com/mozilla/gecko-dev.git
Bug #121011. widget misses mouse-up event after scrolling when mouse button is released outside the widget area. Track passive grabs with sButtonMotionTarget. r=bryner, sr=shaver
This commit is contained in:
Родитель
aba1aab698
Коммит
bf36c82816
|
@ -419,7 +419,9 @@ private:
|
|||
//
|
||||
// Keep track of the last widget being "dragged"
|
||||
//
|
||||
public:
|
||||
static nsWidget *sButtonMotionTarget;
|
||||
private:
|
||||
static gint sButtonMotionRootX;
|
||||
static gint sButtonMotionRootY;
|
||||
static gint sButtonMotionWidgetX;
|
||||
|
|
|
@ -2752,19 +2752,25 @@ nsWindow::GetMozArea()
|
|||
PRBool
|
||||
nsWindow::GrabInProgress(void)
|
||||
{
|
||||
return nsWindow::sIsGrabbing;
|
||||
// there is either an active grab or a passive grab because of a
|
||||
// button motion event
|
||||
return nsWindow::sIsGrabbing || nsWidget::sButtonMotionTarget;
|
||||
}
|
||||
|
||||
/* static */
|
||||
nsWindow *
|
||||
nsWindow::GetGrabWindow(void)
|
||||
{
|
||||
if (nsWidget::sButtonMotionTarget) {
|
||||
return NS_STATIC_CAST(nsWindow *, sButtonMotionTarget);
|
||||
}
|
||||
|
||||
if (nsWindow::sIsGrabbing)
|
||||
{
|
||||
return sGrabWindow;
|
||||
}
|
||||
else
|
||||
return nsnull;
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
GdkWindow *
|
||||
|
|
Загрузка…
Ссылка в новой задаче