зеркало из https://github.com/mozilla/gecko-dev.git
Dispatch scroll wheel events through APZ on Gtk. (bug 1119743, r=nical)
--HG-- extra : rebase_source : c90e3ff64555bb8e121c1605628e2854ea10c823
This commit is contained in:
Родитель
20706f09c9
Коммит
5364eafbb8
|
@ -123,6 +123,8 @@ extern "C" {
|
|||
#include "NativeKeyBindings.h"
|
||||
#include "nsWindow.h"
|
||||
|
||||
#include "mozilla/layers/APZCTreeManager.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::widget;
|
||||
|
@ -3156,8 +3158,19 @@ nsWindow::OnScrollEvent(GdkEventScroll *aEvent)
|
|||
|
||||
wheelEvent.time = aEvent->time;
|
||||
|
||||
nsEventStatus status;
|
||||
DispatchEvent(&wheelEvent, status);
|
||||
if (mAPZC) {
|
||||
uint64_t inputBlockId = 0;
|
||||
ScrollableLayerGuid guid;
|
||||
|
||||
nsEventStatus result = mAPZC->ReceiveInputEvent(*wheelEvent.AsWheelEvent(), &guid, &inputBlockId);
|
||||
if (result == nsEventStatus_eConsumeNoDefault) {
|
||||
return;
|
||||
}
|
||||
DispatchEventForAPZ(&wheelEvent, guid, inputBlockId);
|
||||
} else {
|
||||
nsEventStatus status;
|
||||
DispatchEvent(&wheelEvent, status);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче