Class OverlayMoveEventFilter
EventQueue pushed only while move mode is on, so a drag on a panel never also clicks the
game. Consuming an AWT event does not stop the client's own canvas listener; not dispatching it does.
Who owns a gesture is decided when it is pressed, and every drag and the release of that
gesture go to the same owner: a client that saw a press must see its release, and one that never
saw a press must never see a stray drag or release. A press on a movable panel belongs to the
panel (a left press also starts a move or resize in the OverlayMoveMode), so it, its drags
(even once they outrun the panel) and its release are dropped. A press anywhere else belongs to
the game, so its drags and release pass even when they cross a panel. Only left-button drags move
a panel. Moves, wheel turns and clicks with no gesture in progress are dropped over a panel.
Every other event is dispatched unchanged. It never creates or posts an event; it only drops them.
Every press decides afresh, so a release the filter never saw (focus lost mid-drag) cannot leave a
gesture stuck to the panel.
Only real toolkit events pass through an event queue; the bot's own pointer calls the canvas listeners directly and is never filtered.
Two limits of an pushed queue, both only while move mode is on: (1)
this queue dispatches every event itself, so a dispatchEvent override on a queue below it
(Impact's crash logger, Alora's panel guard) does not run until it is popped; (2) pop()
pops the TOP of the stack, so if another queue is pushed above this one, popping this filter
removes that queue instead (and this one with it). Nothing else in PrivBot pushes a queue.
-
Method Summary
Methods inherited from class java.awt.EventQueue
createSecondaryLoop, getCurrentEvent, getMostRecentEventTime, getNextEvent, invokeAndWait, invokeLater, isDispatchThread, peekEvent, peekEvent, pop, postEvent, push
-
Method Details
-
dispatchEvent
- Overrides:
dispatchEventin classEventQueue
-