Skip to content

Commit

Permalink
Fix pauseWhenLostFocus not working as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
obigu committed Nov 4, 2024
1 parent 1ba527c commit bfe060b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- iOS: Update to MobiVM 2.3.22
- Change visibility of PolygonSpriteBatch.switchTexture() to protected
- Added XmlReader.getChildren() and XmlReader.replaceChild()
- LWJGL3: Fix pauseWhenLostFocus not working as expected

[1.13.0]
- [BREAKING CHANGE] GWT: Updated to 2.11.0. `com.google.jsinterop:jsinterop-annotations:2.0.2:sources` must be added as a dependency to your html project dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ public void invoke (long windowHandle, final boolean focused) {
postRunnable(new Runnable() {
@Override
public void run () {
if (windowListener != null) {
if (config.pauseWhenLostFocus || windowListener != null) {
if (focused) {
if (config.pauseWhenLostFocus) {
synchronized (lifecycleListeners) {
for (LifecycleListener lifecycleListener : lifecycleListeners) {
lifecycleListener.resume();
}
}
listener.resume();
}
windowListener.focusGained();
} else {
Expand Down

0 comments on commit bfe060b

Please sign in to comment.