aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorPo Lu2024-07-08 15:43:55 +0800
committerPo Lu2024-07-08 15:43:55 +0800
commitce56f939affe8147f4172aa030058029a3c7922b (patch)
tree46c4b4ed882ed35187d1de60b2634e91eab16aad /java
parent8e1a43890da53a387c31950f11c3d2dbb7a70614 (diff)
parent67f291ddae31cc4623fd93280b141ee8611f3f5a (diff)
downloademacs-ce56f939affe8147f4172aa030058029a3c7922b.tar.gz
emacs-ce56f939affe8147f4172aa030058029a3c7922b.zip
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.java23
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
78 public static EmacsWindow focusedWindow; 78 public static EmacsWindow focusedWindow;
79 79
80 /* Whether or not this activity is paused. */ 80 /* Whether or not this activity is paused. */
81 private boolean isPaused; 81 private boolean isStopped;
82 82
83 /* Whether or not this activity is fullscreen. */ 83 /* Whether or not this activity is fullscreen. */
84 private boolean isFullscreen; 84 private boolean isFullscreen;
@@ -196,7 +196,7 @@ public class EmacsActivity extends Activity
196 window.view.requestFocus (); 196 window.view.requestFocus ();
197 197
198 /* If the activity is iconified, send that to the window. */ 198 /* If the activity is iconified, send that to the window. */
199 if (isPaused) 199 if (isStopped)
200 window.noticeIconified (); 200 window.noticeIconified ();
201 201
202 /* Invalidate the focus. Since attachWindow may be called from 202 /* Invalidate the focus. Since attachWindow may be called from
@@ -308,8 +308,13 @@ public class EmacsActivity extends Activity
308 public final void 308 public final void
309 onStop () 309 onStop ()
310 { 310 {
311 timeOfLastInteraction = SystemClock.elapsedRealtime (); 311 /* Iconification was previously reported in onPause, but that was
312 misinformed, as `onStop' is the actual callback activated upon
313 changes in an activity's visibility. */
314 isStopped = true;
315 EmacsWindowManager.MANAGER.noticeIconified (this);
312 316
317 timeOfLastInteraction = SystemClock.elapsedRealtime ();
313 super.onStop (); 318 super.onStop ();
314 } 319 }
315 320
@@ -405,19 +410,9 @@ public class EmacsActivity extends Activity
405 410
406 @Override 411 @Override
407 public final void 412 public final void
408 onPause ()
409 {
410 isPaused = true;
411
412 EmacsWindowManager.MANAGER.noticeIconified (this);
413 super.onPause ();
414 }
415
416 @Override
417 public final void
418 onResume () 413 onResume ()
419 { 414 {
420 isPaused = false; 415 isStopped = false;
421 timeOfLastInteraction = 0; 416 timeOfLastInteraction = 0;
422 417
423 EmacsWindowManager.MANAGER.noticeDeiconified (this); 418 EmacsWindowManager.MANAGER.noticeDeiconified (this);