Capture delayed events and cancel as necessary.

Tag #1052
This commit is contained in:
wolfbeast 2019-04-26 14:13:32 +02:00 • committed by Roy Tam
commit e3827df1a0
4 changed files with 20 additions and 9 deletions

View file

@ -617,6 +617,7 @@ protected:
public:
virtual ~DelayedEvent() { }
virtual void Dispatch() { }
virtual bool IsKeyPressEvent() { return false; }
};
class DelayedInputEvent : public DelayedEvent
@ -641,6 +642,7 @@ protected:
{
public:
explicit DelayedKeyEvent(mozilla::WidgetKeyboardEvent* aEvent);
virtual bool IsKeyPressEvent() override;
};
// Check if aEvent is a mouse event and record the mouse location for later
@ -951,6 +953,8 @@ protected:
// Whether the widget has received a paint message yet.
bool mHasReceivedPaintMessage : 1;
bool mIsLastKeyDownCanceled : 1;
static bool sDisableNonTestMouseEvents;
};