Skip to content

Commit

Permalink
Update InputState.java
Browse files Browse the repository at this point in the history
Fix Issue #197
#197
  • Loading branch information
subes authored and croesch committed Sep 8, 2020
1 parent 5009498 commit 6634e26
Showing 1 changed file with 10 additions and 7 deletions.
Expand Up @@ -109,13 +109,16 @@ public void update(@Nonnull AWTEvent event) {
}
if (inputEvent instanceof MouseEvent) {
MouseEvent mouseEvent = (MouseEvent) inputEvent;
Point eventScreenLocation = screenLocation(mouseEvent);
synchronized (this) {
lastEventTime(mouseEvent);
dragDropInfo.update(mouseEvent);
mouseInfo.modifiers(modifiers);
mouseInfo.update(mouseEvent, eventScreenLocation);
modifiers(mouseInfo.modifiers());
//TrayIcon might post events without a component
if(mouseEvent.getComponent() != null) {
Point eventScreenLocation = screenLocation(mouseEvent);
synchronized (this) {
lastEventTime(mouseEvent);
dragDropInfo.update(mouseEvent);
mouseInfo.modifiers(modifiers);
mouseInfo.update(mouseEvent, eventScreenLocation);
modifiers(mouseInfo.modifiers());
}
}
}
}
Expand Down

0 comments on commit 6634e26

Please sign in to comment.