diff options
| author | Po Lu <luangruo@yahoo.com> | 2024-07-08 15:43:55 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2024-07-08 15:43:55 +0800 |
| commit | ce56f939affe8147f4172aa030058029a3c7922b (patch) | |
| tree | 46c4b4ed882ed35187d1de60b2634e91eab16aad /java | |
| parent | 8e1a43890da53a387c31950f11c3d2dbb7a70614 (diff) | |
| parent | 67f291ddae31cc4623fd93280b141ee8611f3f5a (diff) | |
Merge from savannah/emacs-30
67f291ddae3 Correct conditions for iconification on Android
130c3efa108 Fix execution of MS-Windows app execution aliases in Eshell
fffab032b05 Improve 'tab-line-tabs-fixed-window-buffers' sorting perf...
Diffstat (limited to 'java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsActivity.java | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/java/org/gnu/emacs/EmacsActivity.java b/java/org/gnu/emacs/EmacsActivity.java index 7d02e4f4834..0c9e8312b90 100644 --- a/java/org/gnu/emacs/EmacsActivity.java +++ b/java/org/gnu/emacs/EmacsActivity.java @@ -78,7 +78,7 @@ public class EmacsActivity extends Activity public static EmacsWindow focusedWindow; /* Whether or not this activity is paused. */ - private boolean isPaused; + private boolean isStopped; /* Whether or not this activity is fullscreen. */ private boolean isFullscreen; @@ -196,7 +196,7 @@ public class EmacsActivity extends Activity window.view.requestFocus (); /* If the activity is iconified, send that to the window. */ - if (isPaused) + if (isStopped) window.noticeIconified (); /* Invalidate the focus. Since attachWindow may be called from @@ -308,8 +308,13 @@ public class EmacsActivity extends Activity public final void onStop () { - timeOfLastInteraction = SystemClock.elapsedRealtime (); + /* Iconification was previously reported in onPause, but that was + misinformed, as `onStop' is the actual callback activated upon + changes in an activity's visibility. */ + isStopped = true; + EmacsWindowManager.MANAGER.noticeIconified (this); + timeOfLastInteraction = SystemClock.elapsedRealtime (); super.onStop (); } @@ -405,19 +410,9 @@ public class EmacsActivity extends Activity @Override public final void - onPause () - { - isPaused = true; - - EmacsWindowManager.MANAGER.noticeIconified (this); - super.onPause (); - } - - @Override - public final void onResume () { - isPaused = false; + isStopped = false; timeOfLastInteraction = 0; EmacsWindowManager.MANAGER.noticeDeiconified (this); |
