зеркало из https://github.com/mozilla/gecko-dev.git
fix for scrolling problems in trees so mailnews doesn't scroll really really badly
This commit is contained in:
Родитель
7d597fb8c2
Коммит
01ca24fe0a
|
@ -1349,6 +1349,10 @@ nsWidget::OnMotionNotifySignal(GdkEventMotion * aGdkMotionEvent)
|
||||||
// If there is a button motion target, use that instead of the
|
// If there is a button motion target, use that instead of the
|
||||||
// current widget
|
// current widget
|
||||||
|
|
||||||
|
// XXX pav
|
||||||
|
// i'm confused as to wtf this sButtonMoetionTarget thing is for.
|
||||||
|
// so i'm not going to use it.
|
||||||
|
|
||||||
// XXX ramiro
|
// XXX ramiro
|
||||||
//
|
//
|
||||||
// Because of dynamic widget creation and destruction, this could
|
// Because of dynamic widget creation and destruction, this could
|
||||||
|
@ -1362,6 +1366,22 @@ nsWidget::OnMotionNotifySignal(GdkEventMotion * aGdkMotionEvent)
|
||||||
// the GtkWidget corresponding to the sButtonMotionTarget and
|
// the GtkWidget corresponding to the sButtonMotionTarget and
|
||||||
// marking if nsnull in there.
|
// marking if nsnull in there.
|
||||||
//
|
//
|
||||||
|
gint x, y;
|
||||||
|
|
||||||
|
if (aGdkMotionEvent)
|
||||||
|
{
|
||||||
|
x = aGdkMotionEvent->x;
|
||||||
|
y = aGdkMotionEvent->y;
|
||||||
|
|
||||||
|
gdk_window_get_pointer(aGdkMotionEvent->window, &x, &y, nsnull);
|
||||||
|
|
||||||
|
event.point.x = nscoord(x);
|
||||||
|
event.point.y = nscoord(y);
|
||||||
|
|
||||||
|
event.widget = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (nsnull != sButtonMotionTarget)
|
if (nsnull != sButtonMotionTarget)
|
||||||
{
|
{
|
||||||
gint diffX;
|
gint diffX;
|
||||||
|
@ -1396,7 +1416,8 @@ nsWidget::OnMotionNotifySignal(GdkEventMotion * aGdkMotionEvent)
|
||||||
{
|
{
|
||||||
event.time = aGdkMotionEvent->time;
|
event.time = aGdkMotionEvent->time;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
AddRef();
|
AddRef();
|
||||||
|
|
||||||
DispatchMouseEvent(event);
|
DispatchMouseEvent(event);
|
||||||
|
|
|
@ -293,7 +293,8 @@ NS_METHOD nsWindow::CreateNative(GtkWidget *parentWidget)
|
||||||
GDK_FOCUS_CHANGE_MASK |
|
GDK_FOCUS_CHANGE_MASK |
|
||||||
GDK_KEY_PRESS_MASK |
|
GDK_KEY_PRESS_MASK |
|
||||||
GDK_KEY_RELEASE_MASK |
|
GDK_KEY_RELEASE_MASK |
|
||||||
GDK_POINTER_MOTION_MASK);
|
GDK_POINTER_MOTION_MASK |
|
||||||
|
GDK_POINTER_MOTION_HINT_MASK);
|
||||||
|
|
||||||
|
|
||||||
switch(mWindowType)
|
switch(mWindowType)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче