Patent Publication Number: US-2021191741-A1

Title: Window Switching Method, Terminal and Non-Transitory Computer-Readable Storage Medium

Description:
CROSS-REFERENCE TO RELATED APPLICATION(S) 
     The present disclosure is a continuation-application of International (PCT) Patent Application No. PCT/CN2019/096784, filed on Jul. 19, 2019, which claims foreign priority of Chinese Patent Application No. 201811036173.3, filed on Sep. 5, 2018, the entire contents of both of which are hereby incorporated by reference. 
    
    
     TECHNICAL FIELD 
     The present disclosure relates to the field of user interaction technologies, and in particular to a window switching method, a terminal, and a non-transitory computer-readable storage medium. 
     BACKGROUND 
     In the previous Android system, the display interface of all applications was displayed in full screen. If a transparency effect is not configured, only the display interface of one application is visible at a time. However, starting from Android 7.0-version, a multi-window function is supported. Users can open and watch the display interface of multiple applications at the same time, which greatly improves the operation efficiency of users. 
     SUMMARY 
     The present disclosure provides a window switching method, a terminal, and a non-transitory computer-readable storage medium. 
     A first aspect of the present disclosure provides a window switching method, including: determining whether an application running in a foreground of a terminal is displayed in a manner of a free window Freeform; monitoring whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred, in response to the application being displayed in the manner of the free window Freeform; and switching the free window Freeform to a full-screen display window, in response to the application running in the free window Freeform having the triggering event that meets the preset condition occurred. 
     A second aspect of the present disclosure provides a terminal, including a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor executes the computer program to perform the method as described above. 
     A third aspect of the present disclosure provides a non-transitory computer-readable storage medium, storing a computer program, wherein a processor executes the computer program to perform the method as described above. 
    
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
       To further illustrate technical solutions of embodiments of the present disclosure, drawings needed for description of the embodiments will be briefly introduced. Obviously, the following drawings are only some embodiments of the present disclosure. To any one of skill in the art, other drawings may be obtained without any creative work based on the following drawings. 
         FIG. 1  is a flow chart of a window switching method according to a first embodiment of the present disclosure. 
         FIG. 2  is a schematic view of an interface display for displaying a social application in a manner of a free window Freeform according to an embodiment of the present disclosure. 
         FIG. 3  is a flow chart of a window switching method according to a second embodiment of the present disclosure. 
         FIG. 4  is a schematic view of an interface display in which a free window Freeform is dragged to a central area of a terminal display interface according to an embodiment of the present disclosure. 
         FIG. 5  is a schematic view of an interface display in which a window switching selection interface is loaded on a free window Freeform according to an embodiment of the present disclosure. 
         FIG. 6  is a flow chart of switching a free window Freeform into a full-screen display window according to a second embodiment of the present disclosure. 
         FIG. 7  is a schematic view of an interface display according to an embodiment of the present disclosure, in which a free window Freeform corresponding to a social application is switched to a full-screen display window and a game application displayed in a full screen of a terminal is displayed in a manner of a free window Freeform. 
         FIG. 8  is a structural schematic view of an apparatus for switching windows according to an embodiment of the present disclosure. 
         FIG. 9  is a structural schematic view of a terminal according to an embodiment of the present disclosure. 
     
    
    
     DETAILED DESCRIPTION 
     To make any one of skill in the art to understand the technical solutions of the present disclosure, the technical solutions provided by the present disclosure will be described in details by referring to the drawings and the embodiments. It should be understood that the specific embodiments described herein are only to explain the present disclosure, and are not used to limit the present disclosure. Terms of “first”, “second”, and the like in the description of the present disclosure are to distinguish different objects and cannot be understood to indicate or imply relative importance. 
     Furthermore, the terms of “including”, “having” and any variations thereof indicate the presence of described features, integers, steps, operations, elements and/or components, but do not exclude presence or addition of one or more other features, integers, steps, operations, elements, components, and/or their combination. 
     It should also be understood that the terminology used in the description of the present disclosure is for the purpose of describing particular embodiments only and is not intended to limit the present disclosure. As in this specification and the claims, singular forms such as “a”, “an” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. 
     It should be further understood that the term “and/or” in the specification and the claims of the present disclosure refers to any combination of one or more of the items listed in association and all possible combinations, and includes these combinations. 
     As in this specification and the claims, the term “if” can be construed as “when” or “once” or “in response to a determination” or “in response to a detection” depending on the context. Similarly, the phrase “if determined” or “if [the described condition or event] is detected” can be interpreted, depending on the context, to mean “once determined” or “in response to the determination” or “once [the described condition or event] is detected” or “in response to [the described condition or event] being detected”. 
     In the previous Android system, the display interface of all applications was displayed in full screen. If a transparency effect is not configured, only the display interface of one application is visible at a time. However, starting from Android 7.0-version, a multi-window function is supported. Users can open and watch the display interface of multiple applications at the same time, which greatly improves the operation efficiency of users. 
     However, when a terminal opens a display interface of multiple applications at the same time and implements operations on multiple applications through a multi-window manner, the terminal usually displays in a fixed-size window, which has the disadvantage of poor window display flexibility. 
     The embodiments of the present disclosure provide a window switching method, apparatus, terminal and computer-readable storage medium, which may solve the technical problem of poor window display flexibility when the terminal opens the display interfaces of multiple applications at the same time and implements the operations on multiple applications. In order to explain the above-mentioned technical solution of the present disclosure, specific embodiments are provided for description below. 
     As shown in  FIG. 1 ,  FIG. 1  is a flow chart of a window switching method according to a first embodiment of the present disclosure. The method is applied to a terminal and can be executed by a free window Freeform switching device configured on the terminal, which is applicable to a case where a window display is required to improve flexibility. The method may include operations at blocks  101 - 103 . 
     At block  101 : Whether an application running in the foreground of a terminal is displayed in a manner of a free window Freeform is determined. 
     The terminal may include a mobile terminal such as a smart phone, a tablet computer, or a learning machine. The operating system of the terminal may be such as an Android system, a Google system, or an IOS system. The terminal may be installed with applications such as a browser, a social application, an e-book reading application, a video player, an audio player, a game application, a payment application, and the like. 
     In the embodiment of the present disclosure, the free window Freeform is a type of multiple windows, and may be called a free window manner, an active window, and a free window, similar to a floating window. But in fact, the free window Freeform is a real active window, including features of a complete activity window, such as a complete Activity, Window, Focus, Input, etc. 
     The free window Freeform is usually displayed above the display interface of another application, which is a true multi-window. In the Android system, the Freeform window and floating window are in different memory stacks of the Activity Manager management service, and implement display and scheduling functions through different stacks. 
     Specifically, the terminal can open the free window Freeform in two ways, one is defined by System Feature, and the other is started by adding a switch through Setting. 
     For example, in the Android system, when the free window Freeform is opened through the System Feature definition, a Feature configuration file, frameworks/native/dataktc/android.softwarefreeform_window_management.xml, defined in an Android open source project (AOSP) may be first viewed. The file shall be pushed to a directory of the mobile phone: system/etc/permissions/. When the terminal is turned on, Android Package Manager Service (PMS) will read an Extensible Markup Language (XML) configuration in the directory to enable the freeform feature, such that the application may be displayed in the manner of the free window Freeform. 
     Generally, the terminal has a unique freeform stack defined in advance. Each Activity created by all applications supporting the free window Freeform may be launched in a specific Freeform stack. Each Activity in the Android system is located in a Task. A task may contain multiple Activities. There may be multiple instances of a same activity. In Android Manifest.xml, the instances of Activity in Task may be controlled through android: launch Mode. 
     In addition, when the Activity is started to run, the instances of started Activity in Task may be controlled through setFlag. The significance of Task management also lies in a recent task list and Back stack. When multi-tasking is called up through a multi-tasking key (such as a long press on the Home key, an arranged multi-tasking key), it is actually that a recently launched task list is obtained from Activity Manager Service. The Back stack manages the logic about which Activity should jump to when the Back button is clicked on the Activity. 
     When the application supports to display in the manner of the free window Freeform, and a user opens the application in the free window Freeform manner, the terminal may move the Task to the Freeform stack via an application interface provided by an Activity Manager Service (AMS) to support the task to move between different stacks, such that the application displays in the manner of the free window Freeform. 
     Therefore, the determining whether the application running in the foreground of the terminal is displayed in the manner of the free window Freeform may include: detecting whether the Activity of the application running in the foreground of the terminal is located in a Freeform stack predefined by the terminal. When the Activity is located in the Freeform stack, the application running in the foreground of the terminal is determined to be displayed in the manner of the free window Freeform. 
     In some embodiments, the determining whether the application running in the foreground of the terminal is displayed in the manner of the free window Freeform may further include: obtaining a screenshot of the current display interface of the terminal, identifying the screenshot, and determining whether the display interface of the application running in the foreground of the terminal is included in the screenshot of the current display interface of the terminal, based on the identification result of the screenshot. When the display interface of the application running in the foreground of the terminal is included, the application running in the foreground of the terminal is determined to be displayed in the manner of the free window Freeform. 
     For example, as shown in  FIG. 2 , the current full-screen display interface of the terminal is the display interface  21  of a game application. The display interface  22  of a social application is displayed above the display interface  21  of the game application. The social application is determined to be an application displayed in the manner of the free window Freeform. The game application determined to be not an application displayed in the manner of the free window Freeform. 
     At block  102 : When the application running in the foreground of the terminal is displayed in the manner of the free window Freeform, whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred is monitored. 
     In the embodiment of the present disclosure, the trigger event that meets the preset condition refers to a trigger event that meets a requirement of switching the free window Freeform into a full-screen display window. 
     In the embodiment of the present disclosure, the application running in the foreground of the terminal being displayed in the manner of the free window Freeform is a prerequisite for triggering the monitoring whether the triggering event that meets the preset condition occurs in the application running in the manner of the free window Freeform. 
     In some embodiments, when the application running in the foreground of the terminal is not displayed in the manner of the free window Freeform, the monitoring whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred is not performed, and the determining whether the application running in the foreground of the terminal is displayed in the manner of the free window Freeform proceeds to performed, or the operation of the free window Freeform switching apparatus is ended. 
     At block  103 : When the application running in the free window Freeform has the triggering event that meets the preset condition occurred, the free window Freeform is switched to a full-screen display window. 
     In the embodiment of the present disclosure, the switching the free window Freeform to a full-screen display window may include: changing an application display mode from the manner of the free window Freeform to an ordinary full-screen display mode. Alternatively, the manner of the free window Freeform may be retained, and the size of the free window Freeform is adjusted to the size of the full-screen display window in the ordinary full-screen display mode. 
     The ordinary full-screen display mode means that the window displayed in the full-screen mode is not a free window Freeform, but a full-screen display window in the current conventional full-screen display mode. 
     In the embodiment of the present disclosure, after the determining whether the application running in the foreground of the terminal is displayed in the manner of the free window Freeform, whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred is monitored. When the application running in the free window Freeform has the triggering event that meets the preset condition occurred, the free window Freeform is timely switched to a full-screen display window. In this way, the free window Freeform may be automatically switched to a full-screen display, which meets the switching needs of users for window display size, and improves the flexibility of free window Freeform display. 
     In some embodiments, as shown in  FIG. 3 , the method may specifically include operations  301  to  303 . 
     At block  301 : Whether an application running in the foreground of a terminal is displayed in a manner of a free window Freeform is determined. 
     At block  302 : When the application is displayed in the manner of the free window Freeform, whether the current display interface of the application running in the manner of the free window Freeform is a preset function interface is monitored. 
     At block  303 : When the current display interface of the application is the preset function interface, the application running in the free window Freeform is determined to have a triggering event that meets a preset condition occurred, and the free window Freeform is switched to a full-screen display window. 
     The preset function interface refers to a function interface preset and selected according to a configuration from users and corresponding to the application, or a function interface set at the factory and corresponding to the application. For example, when the application is a social application, the preset function interface may be an interface of Moments; when the application is a social application or a payment application, the preset function interface may be a “grab-redpackage” interface. 
     In the embodiment of the present disclosure, whether the current display interface of the application running in the manner of the free window Freeform is the preset function interface is monitored. When the current display interface of the application is the preset function interface, the application running in the free window Freeform is determined to have a triggering event that meets a preset condition occurred, and the free window Freeform is switched to a full-screen display window. In this way, the free window Freeform may be automatically switched to a full-screen display when the display interface is the preset function interface, which meets the switching needs of users for window display size, and improves the flexibility of free window Freeform display. 
     In some embodiments, when the current display interface of the application in the free window Freeform is changed from the preset function interface to a non-preset function interface, the display size of the free window Freeform may be restored to a full screen display so that users can switch back and forth between free window Freeform and full screen display. 
     In some embodiments, the monitoring whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred includes: monitoring whether a preset operation instruction for the free window Freeform is received. When the preset operation instruction for the free window Freeform is received, the triggering event that meets the preset condition is determined to occur in the application running in the manner of the free window Freeform. 
     That is, when the preset operation instruction that users actively enlarge the free window Freeform to a full-screen display window is received, the triggering event that meets the preset condition is determined to occur in the application running in the manner of the free window Freeform. 
     In some embodiments, the monitoring whether the preset operation instruction for the free window Freeform is received includes: monitoring whether the preset operation instruction for dragging the free window Freeform to a preset position is received. 
     Specifically, in the process of the monitoring whether the preset operation instruction for dragging the free window Freeform to the preset position is received, prompt information may be output when a drag operation of dragging the free window Freeform to the preset position is monitored, and whether the drag operation ends when the free window Freeform remains at the preset position is monitored. When the drag operation ends, the preset operation instruction for dragging the free window Freeform to the preset position is determined to be received. 
     The prompt information may include prompt information output in a manner of displaying a dotted line or displaying a dotted frame. 
     For example, as shown in  FIG. 4 , when a user is detected to drag the free window Freeform to a center area of the terminal display interface, a dotted line  41  and a dotted line  42  are displayed, prompting that the current position of the free window Freeform is the center area of the terminal display interface. When it is detected that the free window Freeform remains in the center area and the drag operation ends, the triggering event that meets the preset condition is determined to occur in the application running in the manner of the free window Freeform, and the free window Freeform is switched to a full-screen display window. In this way, the free window Freeform may be automatically switched to a full-screen display, which meets the switching needs of users for window display size, and improves the flexibility of free window Freeform display. 
     It should be noted that in addition to the center area of the terminal display interface, the preset position may also be a user-defined position, such as the upper left corner of the terminal display interface, the upper right corner of the terminal display interface, the lower left corner of the terminal display interface, or the lower right corner of the terminal display interface, or any other position of the terminal display interface. When the user drags the free window Freeform to the preset position, the user is promoted that the current position of the free window Freeform has reached the preset position, by displaying a dotted line or a dotted frame. In this way, the user may determine whether the preset operation instruction is required to be triggered. When it is determined that the preset operation instruction is required to be triggered, the user may keep the free window Freeform at the preset position and end the drag operation such that the terminal switches the free window Freeform into a full-screen display window. 
     In some embodiments, the monitoring whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred further includes: monitoring whether the preset operation instruction triggered by rotating the terminal by a preset angle is received. 
     The preset angle may be a rotation angle defined based on a configuration of a user or a rotation angle set at the factory. For example, the preset angle may be 60° to 180°. When the terminal detects that the terminal is rotated by 60° to 180°, the triggering event that meets the preset condition is determined to occur in the application running in the manner of the free window Freeform, and the free window Freeform is switched to a full-screen display window. 
     In some embodiments, the monitoring whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred further includes: monitoring whether the preset operation instruction triggered by a voice form is received. 
     For example, the operation instruction triggered by the voice form may be a voice signal corresponding to “full-screen displaying the free window”. When the terminal receives the voice signal, the terminal switches the free window Freeform to a full-screen display window. 
     In some embodiments, the monitoring whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred further includes: monitoring whether the preset operation instruction triggered by a touch gesture in the display area of the free window Freeform is received. 
     For example, the operation instruction triggered by the touch gesture in the display area of the free window Freeform may be an operation instruction triggered by a click operation in the display area of the free window Freeform, or by a multi-point sliding outward in the display area of the free window Freeform. 
     In some embodiments, when the trigger event that meets the preset condition occurs in the application running in the manner of the free window Freeform, the switching the free window Freeform to a full-screen display window includes: when the trigger event that meets the preset condition occurs in the application running in the manner of the free window Freeform, popping up a floating window loaded with a window switching selection interface; and switching the free window Freeform to a full-screen display window based on a received full-screen display instruction triggered at the window switching selection interface. 
     For example, as shown in  FIG. 5 , when the terminal detects that the triggering event that meets the preset condition occurs in the application running in the manner of the free window Freeform, a floating window loaded with a window switching selection interface  5  pops up, prompting the user to confirm whether the free window Freeform needs to be switched to a full-screen display window. When the full-screen display instruction triggered by the user clicking a confirmation control  51  in the window switching selection interface  5  is received, the free window Freeform is switched to the full-screen display window. When a cancel switch instruction triggered by the user clicking a cancel control  52  in the window switching selection interface  5  is received, the display size of the free window Freeform is kept, and the free window Freeform is not switched to the full-screen display window. In this way, the free window Freeform may not be mistakenly switched to a full-screen display window. 
     Further, in some embodiments, as shown in  FIG. 6 , the switching the free window Freeform to a full-screen display window includes operations  601  and  602 . 
     At block  601 : Whether an application currently displayed in a manner of full screen can be displayed in the manner of the free window Freeform is determined. 
     At block  602 : When the application currently displayed in the manner of full screen can be displayed in the manner of the free window Freeform, while switching the free window Freeform to a full-screen display window, the application currently displayed in the manner of full screen is displayed in the manner of the free window Freeform. 
     In the embodiment of the present disclosure, whether the application can be displayed in the manner of the free window Freeform is preset. For example, after a software manufacturer develops an application or upgrades an application to make it applicable to display in the manner of the free window Freeform, it means that the application can be performed in the manner of the free window Freeform. 
     For example, video playback applications, social applications, and game applications are applications that can be displayed in the manner of the free window Freeform. As shown in  FIG. 2 , the current full-screen interface of the terminal is the display interface  21  of a game application. The application displayed in the manner of the free window Freeform is a social application. The game application is an application that supports to display in the manner of the free window Freeform. 
     When the free window Freeform corresponding to the social application is switched to a full-screen display window, it can be determined that the current full-screen displaying application (the game application) can be displayed in the manner of the free window Freeform. As shown in  FIG. 7 , while the free window Freeform corresponding to the social application is switched to the full-screen display window  71 , the game application currently displayed in full screen on the terminal may be displayed in the free window Freeform  72 . 
     In the embodiment, when the free window Freeform is switched to a full-screen display window, whether the application currently displayed in a manner of full screen can be displayed in the manner of the free window Freeform is determined. When the application currently displayed in the manner of full screen can be displayed in the manner of the free window Freeform, while switching the free window Freeform to a full-screen display window, the application currently displayed in the manner of full screen is displayed in the manner of the free window Freeform. In this way, while switching the free window Freeform to a full-screen display window, it may be ensured that the application displayed in full screen under the free window Freeform can also be displayed, realizing the interchange of window display manners. 
     In some embodiments, after the free window Freeform is switched to a full-screen display window, the method further includes: receiving a window switching instruction triggered on the full-screen display window, and restoring the full-screen display window to the free window Freeform based on the window switching instruction. 
     That is, after the free window Freeform is switched to a full-screen display window, the full-screen display window can also be restored to the free window Freeform based on the received window switching instruction, such that the user can switch back and forth between the free window Freeform and the full-screen display window, which meets the switching needs of users for window display size, and improves the flexibility of free window Freeform display. 
     The window switching instruction may also be triggered by a window switching instruction triggered by rotating the terminal by a specific angle, a window switching instruction triggered by a voice form, by a touch gesture, or a window switching control in the full-screen display window. 
     It should be noted that the triggering methods of the related instructions described above can be mutually common, as long as the logic of the triggering is correct. That is, in a same scenario, a triggering operation corresponds to a correct response. 
       FIG. 8  is a structural schematic view of an apparatus  800  for switching windows according to an embodiment of the present disclosure, including a determining unit  801 , a monitoring unit  802 , and a switching unit  803 . 
     The determining unit  801  is configured to determine whether an application running in the foreground of a terminal is displayed in a manner of a free window Freeform. 
     The monitoring unit  802  is configured to monitor whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred, when the application running in the foreground of the terminal is displayed in the manner of the free window Freeform. 
     The switching unit  803  is configured to switch the free window Freeform to a full-screen display window, when the application running in the free window Freeform has the triggering event that meets the preset condition occurred. 
     In some embodiments, the monitoring unit  802  is specifically configured to monitor whether the current display interface of the application running in the manner of the free window Freeform is a preset function interface. When the current display interface of the application is the preset function interface, the triggering event that meets the preset condition is determined to occur in the application running in the manner of the free window Freeform. 
     In some embodiments, the monitoring unit  802  is specifically configured to monitor whether a preset operation instruction for the free window Freeform is received. When the preset operation instruction for the free window Freeform is received, the triggering event that meets the preset condition is determined to occur in the application running in the manner of the free window Freeform. 
     In some embodiments, the monitoring unit  802  is further specifically configured to monitor whether the preset operation instruction for dragging the free window Freeform to a preset position is received; and/or monitor whether the preset operation instruction triggered by rotating the terminal by a preset angle is received; and/or monitor whether the preset operation instruction triggered by a voice form is received; and/or monitor whether the preset operation instruction triggered by a touch gesture in the display area of the free window Freeform is received. 
     In some embodiments, the monitoring unit  802  is further specifically configured to output prompt information when a drag operation of dragging the free window Freeform to the preset position is monitored, and monitor whether the drag operation ends when the free window Freeform remains at the preset position. When the drag operation ends, the preset operation instruction for dragging the free window Freeform to the preset position is determined to be received. The prompt information may include prompt information output in a manner of displaying a dotted line or displaying a dotted frame. 
     In some embodiments, the switching unit  803  is further specifically configured to pop up a floating window loaded with a window switching selection interface when the trigger event that meets the preset condition occurs in the application running in the manner of the free window Freeform; and switch the free window Freeform to a full-screen display window based on a received full-screen display instruction triggered at the window switching selection interface. 
     In some embodiments, the switching unit  803  is further specifically configured to determine whether the application currently displayed in a manner of full screen can be displayed in the manner of the free window Freeform. When the application currently displayed in the manner of full screen can be displayed in the manner of the free window Freeform, while switching the free window Freeform to a full-screen display window, the application currently displayed in the manner of full screen is displayed in the manner of the free window Freeform. 
     In some embodiments, the switching unit  803  is further specifically configured to change an application display mode from the manner of the free window Freeform to an ordinary full-screen display mode; or, retain the manner of the free window Freeform, and adjust the size of the free window Freeform to the size of the full-screen display window in the ordinary full-screen display mode. 
     In some embodiments, the switching device may further include a restoration unit configured to receive a window switching instruction triggered on the full-screen display window after switching the free window Freeform to a full-screen display window, and restore the full-screen display window to the free window Freeform based on the window switching instruction. 
     In some embodiments, the determining unit  801  is further specifically configured to detect whether the Activity of the application running in the foreground of the terminal is located in a Freeform stack predefined by the terminal. When the Activity is located in the Freeform stack, the application running in the foreground of the terminal is determined to be displayed in the manner of the free window Freeform. 
     In some embodiments, the above-mentioned determination unit  801  is further specifically configured to obtain a screenshot of the current display interface of the terminal, identify the screenshot, and determine whether the display interface of the application running in the foreground of the terminal is included in the screenshot of the current display interface of the terminal based on the identification result of the screenshot. When the display interface of the application running in the foreground of the terminal is included, the application running in the foreground of the terminal is determined to be displayed in the manner of the free window Freeform. 
     It should be noted that, for convenience and brevity of the description, reference for the specific working process of the window switching device such as apparatus  800  may be made to the corresponding process of the method described in  FIG. 1  to  FIG. 7 , and details are not described herein again. 
     As shown in  FIG. 9 , the present disclosure provides a terminal for implementing the foregoing window switching method. The terminal may be a terminal such as a smart phone, a tablet computer, or a learning machine, and includes: one or more input devices  93  (only one is shown in  FIG. 9 ) and one or more output devices  94  (only one is shown in  FIG. 9 ). A processor  91 , a memory  92 , the input device  93 , and the output device  94  are connected through a bus  95 . 
     It should be understood that, in the embodiment of the present disclosure, the processor  91  may be a central processing unit (CPU), and the processor may also be another general-purpose processor or a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like. 
     The input device  93  may include a virtual keyboard, a touch pad, a fingerprint sensor (for collecting fingerprint information and orientation information of a user), a microphone, and the like. The output device  94  may include a display, a speaker, and the like. 
     The memory  92  may include a read-only memory and a random access memory, and provide instructions and data to the processor  91 . A part or all of the memory  92  may further include a non-volatile random access memory. For example, the memory  92  may also store information of a device type. 
     The memory  92  stores a computer program, and the computer program can run on the processor  91 . For example, the computer program is a program of a window switching method. When the processor  91  executes the computer program, the operations in the embodiments of the window switching method are implemented, for example, operations  101  to  103  shown in  FIG. 1 . Alternatively, when the processor  91  executes the computer program, the functions of the modules/units in the foregoing device embodiments are implemented, for example, the functions of the units  801  to  803  shown in  FIG. 8 . 
     The computer program may be divided into one or more modules/units, and the one or more modules/units are stored in the memory  92  and executed by the processor  91  to complete the present disclosure. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe an execution process of the computer program performing window switching on the terminal. For example, the above computer program can be divided into the determining unit, the monitoring unit, and the switching unit. The specific functions of each unit are as follows: The determining unit is configured to determine whether an application running in the foreground of a terminal is displayed in a manner of a free window Freeform. The monitoring unit is configured to monitor whether the application running in the free window Freeform has a triggering event that meets a preset condition occurred, when the application running in the foreground of the terminal is displayed in the manner of the free window Freeform. The switching unit is configured to switch the free window Freeform to a full-screen display window, when the triggering event that meets the preset condition occurs in the application running in the manner of the free window Freeform. 
     Those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the above-mentioned division of functional units and modules is used as an example. In practical applications, the above functions can be allocated by different functional units or modules according to needs. That is, the internal structure of the above device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form hardware, or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present disclosure. For specific working processes of the units and modules in the foregoing system, reference may be made to corresponding processes in the foregoing method embodiments, and details are not described herein again. 
     In the above embodiments, the description of each embodiment has its own emphasis. For a part that is not detailed or recorded in an embodiment, reference may be made to related descriptions of other embodiments. 
     Those skilled in the art may realize that the units and algorithm operations of each example described in connection with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present disclosure. 
     In the embodiments provided in the present disclosure, it should be understood that the disclosed devices/terminals and methods may be implemented in other ways. For example, the device/terminal embodiments described above are only schematic. For example, the division of the above modules or units is only a logical function division. In actual implementation, there may be another division manner, such as multiple units or components. It can be combined or integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms. 
     The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, which may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of the embodiments. 
     In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit. 
     When the above integrated modules/units are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the methods of the above embodiments, and can also be completed by a computer program instructing related hardware. The above computer program can be stored in a computer-readable storage medium. The computer program is executed by a processor to implement the operations of the foregoing method embodiments. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory Random Access Memory (RAM), electric carrier signals, telecommunication signals, and software distribution media. It should be noted that the content contained in the above computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in jurisdictions. For example, in some jurisdictions, computer-readable media do not include electric carrier signals and telecommunication signals. 
     The above embodiments are only to describe the technical solution of the present disclosure, but are not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or replace some of the technical features equivalently. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be within the scope of the present disclosure.