diff options
| author | Po Lu | 2024-04-15 19:54:20 +0800 |
|---|---|---|
| committer | Po Lu | 2024-04-15 19:58:03 +0800 |
| commit | deef12c15d8c9444a583fffa9254cc4fc44ebfa3 (patch) | |
| tree | 51fb08d7d17bde8ffc886f17b1c130b24ec680fc | |
| parent | 9a79db506e39c02daa81629f0b224a86fad2b3c6 (diff) | |
| download | emacs-deef12c15d8c9444a583fffa9254cc4fc44ebfa3.tar.gz emacs-deef12c15d8c9444a583fffa9254cc4fc44ebfa3.zip | |
Rewrite Android description of Android window management
* doc/emacs/android.texi (Android Environment): Rewrite several
paragraphs to better reflect recent changes and emphasize
behavior on modern OS releases.
| -rw-r--r-- | doc/emacs/android.texi | 120 |
1 files changed, 62 insertions, 58 deletions
diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 3f784bc9637..15c5fbcce3a 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi | |||
| @@ -823,69 +823,73 @@ example, the permission to access contacts may be useful for EUDC. | |||
| 823 | @node Android Windowing | 823 | @node Android Windowing |
| 824 | @section The Android Window System | 824 | @section The Android Window System |
| 825 | 825 | ||
| 826 | Android's window system is unusual, in that all windows are | 826 | Android's window system is unusual in that all windows are reported to |
| 827 | maximized or full-screen, and only one window can be displayed at a | 827 | applications as maximized or full-screen, and, in the general case, only |
| 828 | time. On larger devices, the system permits simultaneously tiling up | 828 | one window can be displayed at a time. On larger devices, the system |
| 829 | to four windows on the screen. | 829 | permits simultaneously tiling up to four windows on the screen, though |
| 830 | 830 | in emulators or installations configured for ``desktop'' system stacks | |
| 831 | Windows on Android do not exist indefinitely after they are created. | 831 | freely resizable windows as other desktop window managers do. |
| 832 | Instead, the system may choose to close windows that are not on screen | 832 | |
| 833 | in order to conserve memory, with the assumption that the program will | 833 | Windows, or, in system nomenclature, activities, do not exist |
| 834 | save its contents to disk and restore them later, when the user asks | 834 | indefinitely after creation, as the system may choose to pause windows |
| 835 | for it to be opened again. As this is obviously not possible with | 835 | that are not visible in order to conserve memory, on the assumption that |
| 836 | Emacs, Emacs separates the resources associated with a frame from its | 836 | the program will save its contents to disk, to be restored when the user |
| 837 | system window. | 837 | selects those windows from the task switcher. Furthermore, a window is |
| 838 | 838 | created by the operating system at Emacs startup that is afforded | |
| 839 | Each system window created (including the initial window created | 839 | special treatment, which Emacs is expected to adopt. |
| 840 | during Emacs startup) is appended to a list of windows that do not | 840 | |
| 841 | have associated frames. When a frame is created, Emacs looks up any | 841 | Emacs approaches window management with the general objective of |
| 842 | window within that list, and displays the contents of the frame | 842 | minimizing differences in frame behavior exposed to Lisp from that of |
| 843 | within; if there is no window at all, then one is created. Likewise, | 843 | frames on ordinary window systems, such as X Windows; the degree to |
| 844 | when a new window is created by the system, Emacs places the contents | 844 | which this goal is actually attained varies by the availability of |
| 845 | of any frame that is not already displayed within a window inside. | 845 | facilities for window management in the version of Android where it is |
| 846 | When a frame is closed, the corresponding system window is also | 846 | installed, and operating system policy towards inactive windows. When |
| 847 | closed. Upon startup, the system creates a window itself (within | 847 | it is unavoidable that concessions should be made to such policy, Emacs |
| 848 | which Emacs displays the first window system frame shortly | 848 | prefers destroying frames to retaining ones with no activities to |
| 849 | thereafter.) Emacs differentiates between that window and windows | 849 | display them, unless such a frame is the initial frame and therefore |
| 850 | created on behalf of other frames to determine what to do when the | 850 | displayed in the activity created at startup, which it is possible to |
| 851 | system window associated with a frame is closed: | 851 | open and identify so long as Emacs is yet executing. |
| 852 | |||
| 853 | @cindex frames and windows, Android 5.0 | ||
| 854 | Android 5.0 and later support an accurate implementation of window | ||
| 855 | management where frames hold a one-to-one relation to the activities in | ||
| 856 | which they are displayed, enabling deletion of activities in the task | ||
| 857 | switcher to directly affect the frames concerned, and vice versa. There | ||
| 858 | are just two exceptions: | ||
| 852 | 859 | ||
| 853 | @itemize @bullet | 860 | @itemize @bullet |
| 854 | @item | 861 | @item |
| 855 | When the system closes the window created during application startup | 862 | After the system pauses an activity that remains in the task switcher in |
| 856 | in order to save memory, Emacs retains the frame for when that window | 863 | response to inactivity, removing it from the task switcher while it |
| 857 | is created later. | 864 | remains in its inactive state will not delete the frame inside, as Emacs |
| 858 | 865 | is not notified of the deletion of its activities in such circumstances. | |
| 859 | @item | 866 | The frame will be deleted upon the next window management operation that |
| 860 | When the user closes the window created during application startup, | 867 | prompts an examination of the list of live windows. Likewise, an |
| 861 | and the window was not previously closed by the system in order to | 868 | inactive activity displaying a frame will not be immediately deleted |
| 862 | save resources, Emacs deletes any frame displayed within that window. | 869 | with its frame, but will be if it is selected from the window list or |
| 863 | 870 | upon another examination of the window list. | |
| 864 | However, on Android 7.0 and later, such frames are not deleted if the | 871 | |
| 865 | window is closed four or more hours after the window moves into the | 872 | @item |
| 866 | background, as the system automatically removes open windows once a | 873 | Any frame besides the initial frame might be deleted after 4 to 6 hours |
| 867 | certain period of inactivity elapses when the number of windows retained | 874 | of inactivity in the background, if it is removed by the system in |
| 868 | by the window manager surpasses a specific threshold, and window | 875 | ``trimming'' the task switcher of excess, and presumably unwanted, |
| 869 | deletion by this mechanism is indistinguishable from window deletion by | 876 | tasks; the initial frame is exempt from this treatment because it can be |
| 870 | the user. Emacs begins to ignore window deletion after two hours less | 877 | reopened otherwise than from the task switcher, but as deletion by this |
| 871 | than the default value of this threshold both to err on the side of | 878 | mechanism is indistinguishable from legitimate user action to remove |
| 872 | caution, in case the system's record of inactivity and Emacs's disagree, | 879 | activities from the task switcher, the latter will also be ignored by |
| 873 | and for the reason that this threshold is open to customization by OS | 880 | the initial frame after a 4-hour interval elapses from the time of last |
| 874 | distributors. | 881 | activity. |
| 875 | |||
| 876 | @item | ||
| 877 | When the user or the system closes any window created by Emacs on behalf | ||
| 878 | of a specific frame, Emacs deletes the frame displayed within that | ||
| 879 | window, unless the system is Android 5.0 or later, where such windows | ||
| 880 | are treated identically to the window created at startup, albeit with no | ||
| 881 | proviso regarding window inactivity. | ||
| 882 | @end itemize | 882 | @end itemize |
| 883 | 883 | ||
| 884 | When the system predates Android 5.0, the window manager will not | 884 | @cindex frames and windows, Android 4.4 |
| 885 | accept more than one user-created Emacs window. If frame creation gives | 885 | @cindex frames and windows, Android 2.2 |
| 886 | rise to windows in excess of this limit, the window manager will | 886 | Android 4.4 and earlier provide considerably inferior interfaces |
| 887 | arbitrarily select one of their number to display, with the rest | 887 | inadequate for a complete implementation of window management. On such |
| 888 | remaining invisible until that window is destroyed with its frame. | 888 | systems, Emacs substitutes a fairly primitive mechanism where all but |
| 889 | the initial frame are deleted when their activities are paused, only a | ||
| 890 | single activity (not counting the activity created at startup) is | ||
| 891 | visible at a time, and unattached frames are displayed in the first | ||
| 892 | unoccupied activity available. | ||
| 889 | 893 | ||
| 890 | @cindex windowing limitations, android | 894 | @cindex windowing limitations, android |
| 891 | @cindex frame parameters, android | 895 | @cindex frame parameters, android |