Floating window dragging method and related equipment
Through the floating window drag method and mirror node technology, the problem of floating window dragging and dragging back between the mobile phone and PC is solved, the interactive experience and security of device interconnection is improved, and rich interactive scenarios between devices are realized.
Patent Information
- Application Number
- CN202310809339.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, when the device is interconnected between the mobile phone and the PC, the mouse function is relatively single, which limits the user's interconnection experience and cannot realize the drag and drag back operation of the floating window, resulting in limited interaction scenarios.
Provide a method of dragging and dragging the suspended window, dragging the suspended window through different devices through the cursor, and adopting mirror node display and screen projection technology to realize dynamic dragging and different-source screen projection of the suspended window, enriching the interaction between devices Scene.
It realizes smooth dragging and dragging back between devices by floating windows, improves user experience, increases the interactive richness of device interconnection, reduces software control logic interference, and ensures the security of the drag and drop process.
Smart Images

Figure CN119225601A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a floating window dragging method and related equipment. Background Art
[0002] With the development of communication technology, some electronic devices can share input devices after being interconnected, and the input devices may include a mouse, a touchpad, etc. For example, after a mobile phone and a personal computer (PC) are interconnected, the content displayed on the mobile phone interface can be triggered by the mouse connected to the PC.
[0003] In some implementations, after the mobile phone is connected to the PC, it is also possible to support dragging files and pictures in the PC to the mobile phone through the mouse connected to the PC. However, the functions achieved by the mouse between the mobile phone and the PC are relatively simple, which is not conducive to the user experience in device interconnection. Summary of the invention
[0004] The embodiment of the present application provides a floating window dragging method and related devices, which are applied to the field of terminal technology. In the embodiment of the present application, the process of dragging a floating window in a mobile phone to a PC and then dragging it back to the mobile phone can be realized, thereby enriching the device interconnection scenario and improving the user experience.
[0005] In a first aspect, an embodiment of the present application provides a floating window dragging method, which is applied to a communication system, wherein the communication system includes a first electronic device installed with a first operating system and a second electronic device installed with a second operating system, the first electronic device or the second electronic device is connected to an input device, and the first operating system is different from the second operating system, and the method includes:
[0006] The first electronic device displays a first cursor and a floating window of a first application, the first cursor is located on the floating window, and the lower layer of the floating window displays a desktop; when the user controls the first cursor to select and drag the floating window through an input device, the floating window moves with the first cursor; in the process of the first cursor dragging the floating window to move, when the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device displays the desktop, stops displaying the floating window, and the second electronic device displays an animated window dragged by the first cursor, the animated window including an identifier of the first application; in the process of the first cursor dragging the animated window to move, when the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device displays the floating window dragged by the first cursor, the lower layer of the floating window displays a desktop, and the second electronic device stops displaying the animated window.
[0007] In this way, it is possible to support the process of dragging the floating window of the first electronic device to the second electronic device, displaying the animated window in the second electronic device, and then dragging the animated window of the second electronic device to the first electronic device, and continuing to display the floating window in the first electronic device, thereby increasing the richness of device interaction.
[0008] In one possible implementation, when the first cursor moves from a first position at the edge of the first screen to an edge of the second screen, the first cursor enters the second electronic device from a second position at the edge of the second screen and starts dragging the animation window from the second position; when the first cursor moves from a third position at the edge of the second screen to an edge of the first screen, the first cursor enters the first electronic device from the first position and starts dragging the floating window from the first position, and the third position is different from the second position.
[0009] In this way, an effect can be presented in which the cursor drags the floating window, and the floating window passes through somewhere on the first electronic device and then passes back through somewhere on the first electronic device.
[0010] In a possible implementation, when the first cursor moves from the third position of the second screen edge to the first screen edge, the first electronic device sets the vertical coordinate of the first cursor to the first vertical coordinate, and the difference between the first vertical coordinate and the vertical coordinate of the first position is less than a certain value. In this way, the return position of the first cursor can be conveniently obtained by the coordinates of the first position.
[0011] In one possible implementation, when the first cursor moves from the fourth position of the first screen edge to the second screen edge, the first cursor enters the second electronic device from the fifth position of the second screen edge and starts to drag the animation window from the fifth position; when the first cursor moves from the sixth position of the second screen edge to the first screen edge, the first cursor enters the first electronic device from the seventh position and starts to drag the floating window from the seventh position; wherein the difference between the first ratio and the second ratio is less than the first threshold, the first ratio is the ratio of the distance from the sixth position to one end of the second screen edge to the second height value, and the second ratio is the ratio of the distance from the seventh position to one end of the first screen edge to the first height value; the first height value is the height of the first screen edge, and the second height value is the height of the second screen edge.
[0012] In this way, when an animated window is dragged out from the second electronic device and a floating window is displayed on the first electronic device, the position of the display edge of the first electronic device and the dragged edge of the second electronic device are not much different, so that the user can get the experience of dragging the window from the second electronic device to the first electronic device smoothly without any lag.
[0013] In a possible implementation, when the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device obtains the second vertical coordinate after the first cursor passes through, and sets the vertical coordinate of the vertex of the floating window to the third vertical coordinate, and the difference between the third vertical coordinate and the second vertical coordinate is less than the second threshold. In this way, the position of the floating window can be easily obtained by calculating the cursor coordinates.
[0014] In a possible implementation, the view of the floating window includes a root node and a child node; when the first cursor starts to drag the floating window, the first electronic device creates a mirror node of the root node and mounts the child node to the mirror node, the mirror node is displayed with the first cursor drag, and the root node is not displayed with the first cursor drag; when the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device hides the mirror node; when the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device displays the mirror node. Because the content displayed by the mirror node is the same as the content displayed by the original floating window, the floating window content seen by the user in the mobile phone interface has not changed, improving the user experience. And in the embodiment of the present application, the floating window animation is dragged during the floating window dragging process, instead of directly dragging the floating window, reducing the interference with the control logic of the application displayed in the floating window, and improving the software security during dragging.
[0015] In a possible implementation, when the first cursor is dragging the dynamic effect window, after detecting that the user releases the first cursor at the eighth position through the input device, the second electronic device displays the projection window at the eighth position, stops displaying the dynamic effect window, and the content of the projection window is partially or completely the same as the content of the floating window, and the first electronic device displays the desktop. In this way, the user can conveniently implement heterogeneous projection of the first application in the second electronic device by dragging the floating window of the first electronic device to the second electronic device.
[0016] In a possible implementation, when detecting that the user releases the first cursor at the eighth position through the input device, the second electronic device also sends a cursor release event to the first electronic device; in response to the cursor release event, the first electronic device also remounts the child node to the root node, destroys the mirror node, and hides the root node; and the first electronic device also performs stack shifting, and when the first electronic device completes the stack shifting, the first electronic device displays the root node. In this way, the first application can restore control over the floating window.
[0017] In a possible implementation, before the first electronic device performs stack shifting, the first electronic device also switches the first application from floating window mode to full screen mode. In this way, full screen projection of the first application in the second electronic device can be achieved.
[0018] In one possible implementation, the first electronic device also maintains a drag state value, and the drag state value includes a first value, a second value and a third value; when the user controls the first cursor to select and drag the floating window through an input device, the first electronic device updates the drag state value from the first value to the second value; when the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device updates the drag state value from the second value to the third value; in response to a cursor release event, the first electronic device updates the drag state value from the third value to the first value.
[0019] In this way, by setting the drag state, when the mouse crosses, the electronic device can determine whether the mouse crosses when there is no drag event (for example, the user does not press the mouse, but only moves the mouse to cross between electronic devices), or whether the cursor drags the window to cross when there is a drag event (for example, the user presses the mouse in the floating window, and moves the mouse to drag the floating window to cross between electronic devices).
[0020] In a possible implementation, when the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, if the first electronic device determines that the value of the drag state is a second value, the first electronic device also sends information for indicating a display window to the second electronic device; the second electronic device displays the dynamic effect window dragged by the first cursor, including: in response to the information for indicating a display window, the second electronic device displays the dynamic effect window dragged by the first cursor. In this way, through the drag state, the first electronic device can conveniently determine the different states of the cursor in the drag operation.
[0021] In a possible implementation, when the user uses an input device to control the first cursor to select and drag the floating window, the first electronic device monitors the operation of dragging the draggable area of the floating window; the first electronic device registers an input event monitor, and the input event monitor is used to monitor the move event. In this way, when the subsequent drag operation continues, the cursor move event can be monitored through the input event monitor, and there is no need to call the moving task every time, saving computing resources.
[0022] In a possible implementation, when the user uses an input device to control the first cursor to select and drag the floating window, the first electronic device also sends identification information of the first application to the second electronic device, and the identification information includes: application package name, application name and / or application icon. In this way, when the cursor subsequently drags the floating window from the first electronic device to the second electronic device, the second electronic device can promptly draw the dynamic effect window based on the application package name, application name and / or application icon, so that the user can have the experience of dragging the floating window to the second electronic device.
[0023] In a possible implementation, when detecting that the user releases the first cursor at the eighth position through the input device, the first electronic device further cancels the input event monitoring, thereby releasing computing resources.
[0024] In a second aspect, an embodiment of the present application provides a communication system, which may include a first electronic device and a second electronic device of the first aspect, wherein the first electronic device may implement a method performed by the first electronic device described in the first aspect or any possible implementation of the first aspect, and the second electronic device may implement a method performed by the second electronic device described in the first aspect or any possible implementation of the first aspect.
[0025] In a third aspect, an embodiment of the present application provides a floating window dragging device, which may be an electronic device, or a chip or chip system in an electronic device. The floating window dragging device may include a display unit and a processing unit. When the floating window dragging device is an electronic device, the display unit may be a display screen. The display unit is used to perform the display step so that the electronic device implements the method performed by the first electronic device or the second electronic device described in the first aspect or any possible implementation of the first aspect. When the floating window dragging device is an electronic device, the processing unit may be a processor. The floating window dragging device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the electronic device implements the method performed by the first electronic device or the second electronic device described in the first aspect or any possible implementation of the first aspect. When the floating window dragging device is a chip or chip system in an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the electronic device implements the method performed by the first electronic device or the second electronic device described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (eg, a register, a cache, etc.), or a storage unit within the electronic device that is located outside the chip (eg, a read-only memory, a random access memory, etc.).
[0026] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute a method executed by a first electronic device described in any possible implementation of the first aspect, or to execute a method executed by a second electronic device described in any possible implementation of the first aspect.
[0027] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method performed by the first electronic device as described in any possible implementation of the first aspect is implemented, or the method performed by the second electronic device as described in any possible implementation of the first aspect is implemented.
[0028] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run, the computer executes a method executed by a first electronic device described in any possible implementation of the first aspect, or executes a method executed by a second electronic device described in any possible implementation of the first aspect.
[0029] In a seventh aspect, the present application provides a chip or a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute a method performed by a first electronic device described in any possible implementation of the first aspect, or to execute a method performed by a second electronic device described in any possible implementation of the first aspect. The communication interface in the chip may be an input / output interface, a pin, or a circuit, etc.
[0030] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).
[0031] It should be understood that the second to seventh aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of a keyboard and mouse interconnection scenario in an embodiment of the present application;
[0033] Figure 2 This is a schematic diagram of another keyboard and mouse interconnection scenario according to an embodiment of the present application;
[0034] Figure 3 A schematic diagram of the hardware structure of a first electronic device provided in an embodiment of the present application;
[0035] Figure 4 A schematic diagram of the hardware structure of a second electronic device provided in an embodiment of the present application;
[0036] Figure 5 A schematic diagram of the software structure of a first electronic device and a second electronic device provided in an embodiment of the present application;
[0037] Figure 6 A schematic diagram of software module interaction provided in an embodiment of the present application;
[0038] Figure 7 A schematic diagram of displaying a floating window in a mobile phone provided in an embodiment of the present application;
[0039] Figure 8 A schematic diagram of displaying a floating window dynamic effect in a mobile phone provided in an embodiment of the present application;
[0040] Fig. 9 A schematic diagram of a partial dynamic effect window displayed in a PC provided in an embodiment of the present application;
[0041] Fig.10 A schematic diagram of a PC displaying a complete dynamic effect window provided in an embodiment of the present application;
[0042] Fig.11 Another software module interaction diagram provided in an embodiment of the present application;
[0043] Fig.12 A schematic diagram of displaying a heterogeneous screen projection window in a PC provided in an embodiment of the present application;
[0044] Fig.13 A schematic diagram of displaying a same-source screen projection window in a PC provided in an embodiment of the present application;
[0045] Fig.14 A schematic diagram of another PC displaying a partial dynamic effect window provided in an embodiment of the present application;
[0046] Fig.15 A schematic diagram of displaying a floating window dynamic effect in a mobile phone provided in an embodiment of the present application;
[0047] Fig.16 A schematic diagram of node state change provided in an embodiment of the present application;
[0048] Fig.17 A flowchart of a floating window dragging method provided in an embodiment of the present application;
[0049] Fig.18 A schematic diagram of the hardware structure of the chip provided in the embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0051] 1. Same-source screen projection: It can be understood that the content displayed in the screen projection interface of the projected device is the same or basically the same as the content displayed on the screen projection device interface. For example, when a mobile phone or PAD is used as a screen projection device to project the same-source screen to the projected device PC, the interface displayed by the mobile phone or PAD is the same as the content displayed in the screen projection display window on the PC. Of course, the screen projection display window on the PC can also display a title bar (such as maximize and minimize buttons), or the screen projection display window on the PC may not display the content in the status bar of the mobile phone or PAD. When the interface in the mobile phone or PAD changes from the first interface to the second interface, the content displayed in the screen projection display window on the PC may also change from the first interface to the second interface.
[0052] 2. Heterogeneous screen projection: It can be understood that the content displayed in the projection interface of the projected device may be different from the content displayed on the projection device interface. For example, when a mobile phone or PAD is used as a projection device to project the screen to the projected device PC, the mobile phone or PAD can display the interface of the first application, and the projection display window on the PC can display the interface of the second application. When the interface in the mobile phone or PAD changes from the first interface to the second interface, the interface displayed in the projection display window on the PC may remain unchanged.
[0053] 3. Keyboard and mouse sharing technology: It can be understood as a technology that uses the input device of an electronic device to control the electronic device and other electronic devices interconnected with the electronic device.
[0054] 4. Drag state: It can be used to identify whether the drag operation continues and whether the cursor is in the electronic device that starts the drag during the drag. For example, the drag state may include a first value, a second value, and a third value. The first value is used to indicate that there is no drag event in progress; the second value is used to indicate that there is a drag event in progress and the cursor is displayed in the electronic device that starts the drag; the third value is used to indicate that there is a drag event in progress and the cursor is not displayed in the electronic device that starts the drag. Among them, the occurrence of a drag event can be understood as the drag operation has not ended (for example, the user has not released the mouse), and the absence of a drag event can be understood as the absence of a drag operation (for example, the user has not pressed the mouse and dragged). The first value, the second value, and the third value can be different without special limitation. For example, the first value can be set to 0, the second value to 1, the third value to 2, etc.
[0055] In an embodiment of the present application, by setting the drag state, when a mouse crossing occurs, the electronic device can determine whether the mouse crossing is a cursor crossing when there is no drag event (for example, the user does not press the mouse, but only moves the mouse to cross between electronic devices), or a cursor dragging window crossing when there is a drag event (for example, the user presses the mouse in the floating window, and moves the mouse to drag the floating window to cross between electronic devices).
[0056] For example, when the mouse passes through the electronic device from which the mouse is being dragged, if the electronic device determines that the dragging state is the second value, the electronic device updates the dragging state to the third value; if the electronic device determines that the dragging state is not the second value, the electronic device does not update the dragging state, and the electronic device can execute the cursor crossing related processes when there is no dragging event.
[0057] Similarly, when the mouse passes back from another electronic device to the electronic device that initiated the drag, if the electronic device determines that the drag state is the third value, the electronic device updates the drag state to the second value; if the electronic device determines that the drag state is not the third value, the electronic device does not update the drag state, and the electronic device can execute the cursor crossing related processes when there is no drag event.
[0058] 5. Other terms
[0059] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0060] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0061] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.
[0062] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or can be a period of time before or after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.
[0063] In some implementations, devices that establish communication based on keyboard and mouse sharing technology only support dragging and dropping of files, pictures, and application icons. After dragging files, pictures, and application icons from one device to another, dragging files, pictures, and application icons back to the original device is not supported. The interaction scenarios are relatively limited, affecting the user experience.
[0064] In view of this, the floating window dragging method provided in the embodiment of the present application can support the dragging of floating windows between electronic devices. Among them, the operating systems installed on the two electronic devices can be different, for example, device 1 is an Android operating system, and device 2 is a Windows operating system. For example, after the floating window of device 1 is dragged to device 2, it can also support the floating window to be dragged from device 2 back to device 1, or, after the floating window of device 1 is dragged to device 2, heterogeneous screen projection is realized on device 2, enriching the scene of interaction between devices and improving user experience.
[0065] The floating window dragging method provided in the embodiment of the present application may be applied in a communication system, which may include a first electronic device 100 and a second electronic device 200.
[0066] For example, Figure 1 As shown, an input device 300 may be connected to the first electronic device 100, and the first electronic device 100 and the second electronic device 200 may establish a communication connection. After the first electronic device 100 and the second electronic device 200 turn on the keyboard and mouse sharing function, the user can not only use the input device 300 of the first electronic device 100 to control the first electronic device 100, but also pass the input device 300 to the screen of the second electronic device 200 to control the second electronic device 200. In an embodiment of the present application, the user can drag the floating window in the first electronic device 100 to the second electronic device 200, and then display the content of the floating window of the first electronic device 100 on the screen of the second electronic device 200 through the same-source screen projection or the different-source screen projection. In this way, the scene of interaction after the first electronic device 100 and the second electronic device 200 are interconnected can be enriched, and the user experience can be improved.
[0067] Or, if Figure 2As shown, the second electronic device 200 may be connected to an input device 300, and the first electronic device 100 and the second electronic device 200 may establish a communication connection. After the first electronic device 100 and the second electronic device 200 turn on the keyboard and mouse sharing function, the user can not only use the input device 300 of the second electronic device 200 to control the second electronic device 100, but also pass the input device 300 to the screen of the first electronic device 100 to control the first electronic device 100. In an embodiment of the present application, the user can drag the floating window in the first electronic device 100 to the second electronic device 200, and then display the content of the floating window of the first electronic device 100 on the screen of the second electronic device 200 through the same source screen projection or the different source screen projection. In this way, the scene of interaction after the first electronic device 100 and the second electronic device 200 are interconnected can be enriched, and the user experience can be improved.
[0068] Among them, the first electronic device 100 and the second electronic device 200 may enable the keyboard and mouse functions in the following ways, including but not limited to: using the input device 300 to touch the edge of the first electronic device 100 or the edge of the second electronic device 200 a preset number of times, and / or, the second electronic device 200 provides an interface for establishing keyboard and mouse sharing with the first electronic device 100, and the user chooses to share the keyboard and mouse with the first electronic device 100 in the interface.
[0069] Understandably, Figure 1 and Figure 2 The first electronic device 100 is a mobile phone, the second electronic device 200 is a PC, and the input device 300 is a mouse. This example does not limit the first electronic device 100, the second electronic device 200, and the input device 300.
[0070] The first electronic device 100 and the second electronic device 200 can be devices of the same type or devices of different types. Exemplarily, the first electronic device 100 and the second electronic device 200 can be any of the following electronic devices: a mobile phone, a tablet computer, a PDA, a laptop computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a wireless communication device, ... assistant, PDA), handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, electronic devices in 5G networks or electronic devices in future public land mobile networks (PLMN), electronic devices in Internet of Things (IoT) systems, etc., which are not limited in the embodiments of the present application. Among them, the mobile phone can be a straight-screen mobile phone or a folding screen mobile phone.
[0071] The input device 300 may include a mouse, a touch pad, a touch screen, or the like.
[0072] It should be noted that when the input device is connected to the first electronic device 100 or the second electronic device 200, it can be a wired connection or a wireless connection. When the input device is wiredly connected to a device such as a mobile phone or a PAD, an adapter can be used to convert the interface of the input device into a type that can be inserted into the interface of the mobile phone or PAD to achieve a wired plug-in connection.
[0073] In order to better understand the embodiment of the present application, the structure of the first electronic device 100 and the structure of the second electronic device 200 in the embodiment of the present application are exemplarily introduced below:
[0074] Figure 3 The structure diagram of the first electronic device 100 is shown. The first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0075] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0076] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0077] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0078] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0079] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0080] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0081] The first electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for floating window dragging, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0082] Figure 4 FIG. 2 shows a schematic diagram of the structure of the second electronic device 200. Figure 4, the second electronic device 200 may include multiple subsystems that cooperate to perform, coordinate or monitor one or more operations or functions of the electronic device 202. The second electronic device 200 includes a processor 210, an input surface 220, a coordination engine 230, a power subsystem 240, a power connector 250, a wireless interface 260 and a display 270.
[0083] Exemplarily, the coordination engine 230 can be used to communicate and / or process data with other subsystems of the second electronic device 200; for example, communicate and / or trade data with the stylus 100; measure and / or obtain the output of one or more analog or digital sensors (such as a touch sensor), etc.
[0084] The processor 210 may be used to execute, coordinate and / or manage functions of the second electronic device 200. Such functions may include, but are not limited to, communicating with other subsystems of the second electronic device 200 and / or transaction data, etc.
[0085] The processor 210 may be used to process, receive or send data or instructions. For example, the processor may be a microprocessor, a central processing unit, an application specific integrated circuit, a field programmable gate array, a digital signal processor, an analog circuit, a digital circuit or a combination of these devices. The processor may be a single-threaded or multi-threaded processor. The processor may be a single-core or multi-core processor.
[0086] During use, the processor 210 may be configured to access a memory storing instructions that may be configured to cause the processor to execute, coordinate or monitor one or more operations or functions of the second electronic device 200 .
[0087] The wireless interface 260 may be used to communicate with the first electronic device 100 .
[0088] It is understandable that some of the specific details presented above regarding the first electronic device 100 and the second electronic device 200 may not be necessary, and the embodiments of the present application do not limit the specific structures of the first electronic device 100 and the second electronic device 200.
[0089] In the embodiment of the present application, the first electronic device 100 and the second electronic device 200 may use different operating systems, and the operating system may include, for example, any of the following operating systems: Linux operating system, Unix operating system, Android operating system, iOS operating system or Windows operating system, etc.
[0090] For example, Figure 5Taking the case where the operating system of the first electronic device 100 is the Android system and the operating system of the second electronic device 200 is the Windows system as an example, partial software architectures of the first electronic device 100 and the second electronic device 200 are exemplified.
[0091] like Figure 5 As shown, the operating system of the first electronic device 100 may include an application layer and an application framework layer (framework, FWK).
[0092] The application layer may include a keyboard and mouse module, which may also be called a virtual input installation package (virtualinput android package, VIAPK, keyboard and mouse APK, etc.).
[0093] The keyboard and mouse module can be used for device connection management, drag status update and synchronization, keyboard and mouse event interception and injection, mouse crossing identification, etc. Among them, device connection management is used to realize discovery and communication connection between devices, drag status update and synchronization is used to update and synchronize whether there is a drag event in the device, whether there is a cursor in the device, etc., keyboard and mouse event interception and injection is used to intercept and inject keyboard and mouse parameters when it is determined that a keyboard and mouse event occurs, etc., and mouse crossing identification is used to identify whether the mouse cursor crosses the edge of the display screen of the electronic device.
[0094] FWK can include a variety of system services (system server), including, for example, motion effect management, drag process management, and heterogeneous screen projection.
[0095] Animation management can be used for hot zone initialization and strategy matching, gesture recognition, input event listening, animation start and stop, animation resource management, etc. Among them, the hot zone in animation management can be understood as the draggable area in the animation interface, strategy matching is used to match the scene of animation display, the content of animation, etc., gesture recognition is used to identify drag operations, input event listening is used to listen to the position of the mouse, animation start and stop is used to manage the timing of animation display or non-display, and animation resource management is used to manage the resources required for animation display.
[0096] The drag process management can be used for drag status update and synchronization, application layer visibility management, abnormal timeout protection, etc. Among them, the drag status update and synchronization is used to update and synchronize whether there is a drag event in the device, whether there is a cursor in the device, etc. Optionally, the drag status in FWK can be synchronized with the drag status in the keyboard and mouse APK. Application layer visibility management is used to manage the display or hiding of the layer where the floating window is located. Abnormal timeout protection is used to protect the normal operation of the application in the floating window when the drag process is abnormal.
[0097] Heterogeneous screen projection can be used for application stack shifting, window mode switching, etc. Among them, application stack shifting is used to realize heterogeneous screen projection of the content in the floating window of an electronic device to other devices, and window mode switching is used to switch the window mode from floating window mode to full screen mode.
[0098] It is understandable that the application framework layer may also include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc., which is not specifically limited in the embodiments of the present application.
[0099] Of course, the operating system of the first electronic device 100 may also include a hardware abstract layer (HAL), a driver layer, and a hardware layer, etc. Each layer has its own role and division of labor, which is not limited in the embodiment of the present application.
[0100] like Figure 5 As shown, the operating system of the second electronic device 200 may include an application layer, and the application layer may include applications such as PC Manager.
[0101] PC Manager can be installed in the operating system of the PC as a system application or a third-party application. For example, PC Manager can be used for device connection management, drag status update and synchronization, animation start and stop, animation resource management, etc. Among them, device connection management is used to achieve discovery and communication connection between devices, drag status update and synchronization is used to update and synchronize whether there are drag events in the device, whether there is a cursor in the device, etc., animation start and stop is used to manage the display or non-display timing of animation, and animation resource management is used to manage the resources required for the display of animation.
[0102] Of course, the operating system of the second electronic device 200 may also include other layers such as a kernel and a driver, which are used to implement various functions of the second electronic device 200 together with the application layer, and this embodiment of the present application does not limit this.
[0103] When the first electronic device 100 and the second electronic device 200 implement the floating window dragging method of the embodiment of the present application, the modules in the operating systems of each device can interact with each other. The following will combine the possible software module interactions and possible interface displays in the floating window dragging process implemented by the first electronic device 100 and the second electronic device 200 to exemplify the floating window dragging method provided by the embodiment of the present application.
[0104] For ease of description, in the embodiments of the present application and the related drawings, the first electronic device 100 is a mobile phone, the second electronic device 200 is a PC, and the input device 300 is a mouse. This example does not constitute a specific limitation on the first electronic device 100, the second electronic device 200, and the input device 300. For example, the first electronic device 100 can also be replaced by a PAD, etc.
[0105] It is understandable that before the mobile phone and the PC drag the floating window, the mobile phone and the PC can first connect the keyboard and mouse. During the keyboard and mouse connection stage, the mobile phone can bind the communication service between the application framework layer and the keyboard and mouse module for mutual communication between subsequent modules. In addition, the application framework layer can apply to the keyboard and mouse module for a drag switch. The keyboard and mouse module can decide whether to support window dragging based on the configuration items of the mobile phone and the situation of the PC, and return it to the application framework layer. If the mobile phone supports window dragging, the floating window dragging method of the embodiment of the present application can be executed.
[0106] For example, Figure 6 The diagram shows a schematic diagram of the interaction process of each module in the mobile phone and PC software system in a scenario where a drag operation on a floating window is received from the mobile phone and the drag operation continues, causing the mouse to pass from the mobile phone to the PC.
[0107] like Figure 6 As shown, the modules involved on the mobile phone side may include the keyboard and mouse module in the application layer and the following modules in the application framework layer: free form caption view, task positioning controller, task positioner, task module, virtual input manager, and multi display manager. Among them, the free form caption view can be used to determine whether there is an operation of dragging the bar of the free form window, the task positioning controller can be used to obtain the moving task, the task positioner can be used to locate the position of the cursor in the mobile phone, the task module can be used to perform related work in the free form window dynamic effect display, and the virtual input management can be used to manage the dragging state and hiding of the free form window.
[0108] The above modules in the application framework layer of the mobile phone interact with each other and can be used to implement the following Figure 5 Services for motion effect management, drag process management, and heterogeneous screen projection.
[0109] The modules involved on the PC side may include a keyboard and mouse module and a screen projection module. The screen projection module is used to realize the screen projection of the application in the mobile phone floating window on the PC.
[0110] like Figure 6 As shown, the interaction process of each module in the mobile phone and PC software system may include the following steps:
[0111] S601: The floating window title view detects a bar dragging operation.
[0112] The floating window may include a draggable area, and the draggable area may include a bar, an area where a title bar is located, and / or an area near the title bar. Figure 7 is a display interface of a mobile phone. Among them, the mobile phone displays the status bar and the display interface of the gallery APP. The display interface of the album APP is displayed in the form of a floating window. Among them, Figure 7 The area between the middle dotted line and the top of the floating window can be set as the draggable area 701. The draggable area of the floating window can be managed by the application displayed in the floating window.
[0113] When the keyboard and mouse function is turned on in the mobile phone, the cursor 702 can be moved to the draggable area 701 through an input device such as a mouse. The cursor 702 can be Figure 7 The arrow shape shown may also be a circle or any other shape, which is not specifically limited in the embodiments of the present application.
[0114] The user can press the mouse and drag in the draggable area 701 to trigger the floating window title view of the mobile phone to monitor the drag bar operation, where the drag bar operation can also be called a drag operation.
[0115] S602: The floating window title view instructs the task location controller to start moving the task.
[0116] When the floating window title view monitors the operation of dragging the draggable area 701 in the floating window, a function (for example, start moving task) may be called to instruct the task positioning controller to start the moving task.
[0117] S603: The task location controller instructs the task locator to register an input event listener.
[0118] After the task locator controller gets the start moving task, it can instruct the task locator to register an input event listener, which can be used to listen to move events. In this way, when the subsequent drag operation continues, the cursor move event can be listened to through the task locator, without calling the moving task every time, saving computing resources.
[0119] It is understandable that when the task locator registers the input event listener, the task locator can also initialize the dragging animation to prepare for displaying the floating window moving animation.
[0120] S604: The task locator transmits the application (e.g. Figure 7 The following information of the album application in the virtual input management transmission is updated to the second value.
[0121] S605: The virtual input management transmits information such as the application package name, application name, and application icon to the keyboard and mouse module of the mobile phone, and the keyboard and mouse module of the mobile phone updates the drag state to the second value.
[0122] In the embodiment of the present application, the second value can be used to indicate that a drag operation is in progress and the cursor is displayed on the mobile phone.
[0123] It is understandable that when there is no drag event, the drag status in the virtual input management and the keyboard and mouse module of the mobile phone can both be a first value, and the first value can be used to indicate that no drag operation is performed.
[0124] S606: The keyboard and mouse module of the mobile phone sends information such as the application package name, application name, and application icon to the keyboard and mouse module of the PC.
[0125] Based on S604-S606, the task locator can send information such as the application package name, application name, and application icon to the keyboard and mouse module of the PC in advance through the virtual input management and the keyboard and mouse module of the mobile phone. In this way, when the cursor drags the floating window from the mobile phone to the PC, the PC can promptly draw the dynamic window through the application package name, application name, and / or application icon, so that the user can have the experience of dragging the floating window to the PC. Among them, the dynamic window will be described in detail in the subsequent steps and will not be repeated here. Among them, the application package name can be the globally unique identifier of the application.
[0126] It should be noted that when executing S604-S606, the floating window in the mobile phone can be continuously displayed, and the task module can execute steps related to the display of the floating window. For example, the task module can synchronize the coordinates of the floating window with the coordinates of the cursor so that the floating window moves with the cursor.
[0127] It is understandable that when a mobile phone displays a floating window, the view of the floating window may include a root node and various sub-nodes under the root node, and these root nodes and various sub-nodes under the root node are controlled by the application displayed in the floating window. In order not to affect the control logic of the application displayed in the floating window and to improve the safety of the dragging process, a mirror node may be created for the root node of the view of the floating window, and the mirror node may replace the root node.
[0128] For example, Fig.16As shown, circles 1 to 7 are all task nodes in the view of the floating window, circle 1 is the root node. When there is no operation of dragging the floating window in the mobile phone, Fig.16 As shown in a, the task module uses circle 1 as the root node for floating window display.
[0129] When the user drags the floating window on the phone, Fig.16 As shown in b, the task module creates a mirror node circle 8 of the root node circle 1, and uses circle 8 instead of circle 1 as the root node, wherein the floating window that uses circle 8 instead of circle 1 as the root node can be called a floating window dynamic effect. Because the content of the floating window dynamic effect is the same as the content displayed in the original floating window, the floating window content seen by the user in the mobile phone interface has not changed, thereby improving the user experience. In addition, in the embodiment of the present application, the floating window dynamic effect is dragged during the dragging of the floating window, rather than directly dragging the floating window, thereby reducing interference with the control logic of the application displayed in the floating window and improving software security during dragging.
[0130] The following is a specific example to illustrate the task module executing the above-mentioned steps related to the floating window dynamic effect management. For example, the steps related to the floating window dynamic effect management include:
[0131] (1) Create a drag-and-drop animation surface control: mFree Form Scale Leash. (2) Set the mFreeFormScaleLeash layer. (3) Traverse all child nodes, edges, shadows, etc. of Task and reparent them to mFreeFormScaleLeash. (4) Execute the transaction.
[0132] Among them, mFreeFormScaleLeash can be understood as a mirror node that inherits the original root node of the floating window (which can correspond to Fig.16 Circle 8), mFreeFormScaleLeash can also be named in any other form without limitation. Setting the mFreeFormScaleLeash layer level can make the floating window animation that replaces the original root node with mFreeFormScaleLeash be displayed on the mobile phone interface. Traversing all child nodes, edges, shadows, etc. of Task, and reparenting to mFreeFormScaleLeash, can make the content displayed by the floating window that replaces the original root node with mFreeFormScaleLeash consistent with the content of the floating window before dragging. Executing transaction completes the above floating window animation configuration. This process will be described in detail with examples of mouse crossing events later, so I will not go into details here.
[0133] In this way, when the drag operation continues, the task locator listens to the input event and continues to receive the mouse move event (x, y). The task can update the real-time coordinate position of mFreeFormScaleLeash to realize the floating window position moving with the cursor.
[0134] For example, Figure 8 As shown, still taking the floating window of the gallery APP in the mobile phone as an example, the user can drag the floating window 801 to the edge of the mobile phone screen. During this process, the part of the floating window 801 that exceeds the edge of the mobile phone screen is not displayed, and the part of the floating window that does not exceed the edge of the mobile phone screen is displayed.
[0135] S607: The keyboard and mouse module of the mobile phone indicates to the virtual input management that a mouse crossing occurs.
[0136] During the drag operation, the cursor may drag the floating window across the edge of the mobile phone display screen. The keyboard and mouse module of the mobile phone can monitor the occurrence of mouse crossing, and the keyboard and mouse module of the mobile phone can indicate the occurrence of mouse crossing to the virtual input management.
[0137] S608: The virtual input management instructs the task module to hide the floating window.
[0138] At the same time, the virtual input management and the keyboard and mouse module of the mobile phone can update the drag state to a third value. The third value can be used to indicate that the drag operation is not completed and the mouse passes from the mobile phone to the PC.
[0139] For example, when the keyboard and mouse module of the mobile phone detects that the mouse crosses, the virtual input management and the keyboard and mouse module of the mobile phone can first determine whether the drag state is the second value. If the drag state is the second value, the keyboard and mouse module of the mobile phone and the virtual input management can both update the drag state to the third value, and the keyboard and mouse module of the mobile phone can also synchronously indicate the display window to the PC. If the drag state is not the second value, the keyboard and mouse module of the mobile phone and the virtual input management may not update the drag state, and the keyboard and mouse module of the mobile phone may not indicate the display window to the PC.
[0140] S609: The task module hides the floating window.
[0141] For example, the task module hides mFreeFormScaleLeash. Since mFreeFormScaleLeash is the root node of the floating window, if the root node is hidden, other nodes are also hidden, and the floating window in the mobile phone is hidden and not displayed. Fig.16 As shown in c, when the cursor passes from the mobile phone to the PC, the task module hides circle 8 as the root node, and the floating window in the mobile phone is hidden and not displayed.
[0142] S610. The keyboard and mouse module of the mobile phone indicates a display window to the keyboard and mouse module of the PC.
[0143] It should be noted that S610 can be executed synchronously with S608. For example, after the mouse crosses from the mobile phone to the PC, if the keyboard and mouse module of the mobile phone determines that the drag state is the second value, the keyboard and mouse module of the mobile phone indicates to the virtual input management that the mouse crosses, and indicates to the keyboard and mouse module of the PC that the window is displayed.
[0144] S611. The PC displays an animation window, which includes information such as a sending package name and / or an application icon.
[0145] After the mouse passes from the mobile phone to the PC, the floating window in the mobile phone is hidden and the dynamic window is drawn in the PC. The dynamic window can be understood as a dynamic window drawn by the PC according to the package name and icon of the application in the floating window of the mobile phone. The dynamic window does not include a specific application running interface. The size of the dynamic window can be a default value or related to the resolution of the mobile phone, etc., which is not specifically limited in the embodiments of this application.
[0146] During the dragging operation, the part of the animation window that exceeds the edge of the PC screen is not displayed, and the part of the window that does not exceed the edge of the PC screen is displayed. For example, let's take the example of a user dragging the floating window of the gallery application on a mobile phone to move to the PC. Fig. 9 FIG. 9 is a schematic diagram showing an interface in which a floating window is hidden and displayed in a mobile phone, and a part of an animated window 901 is displayed in a PC. As the dragging operation is performed, the animated window can be completely displayed in the PC, such as Fig.10 It shows a schematic diagram of the interface in which a floating window is hidden and displayed in a mobile phone, and a complete dynamic effect window 1001 is displayed in a PC.
[0147] It should be noted that when the mouse passes from the mobile phone to the PC, the initial display position of the animation window in the PC can be implemented differently.
[0148] In a possible implementation, when the mouse passes from the mobile phone to the PC, a floating window can be dragged out from the mobile phone and the PC's dynamic window is displayed on the PC, and the position of the PC display edge and the mobile phone dragged edge are not much different.
[0149] For example, the PC can calculate the coordinates (x0, y0) after the cursor passes through, and then the keyboard and mouse module of the PC can set the coordinates of the left vertex of the animation window to (x1, y0±a), where x1 can be a value preset by the PC, x1 can be used to define the distance between the left vertex of the animation window and the right edge of the PC screen, and a can be a smaller value, because the vertical coordinate of the left vertex of the animation window of the PC is the same as or not much different from the vertical coordinate of the cursor, so that when the floating window is dragged out from the mobile phone and the animation window of the PC is displayed on the PC, the position of the edge dragged in by the PC and the edge dragged out by the mobile phone are not much different, for example, combined with Figure 8, when the dynamic effect window 801 is dragged out from the upper 1 / 3 of the edge of the mobile phone screen, Fig. 9 As shown, the PC's animated window 901 can come out from the upper 1 / 3 of the PC screen edge, so that the user can get the experience of dragging the window from the mobile phone to the PC smoothly without any lag.
[0150] Among them, one way for the PC to calculate the coordinates (x0, y0) after the cursor passes through is: when the mobile phone and PC keyboard and mouse are interconnected, the respective screen heights are exchanged with each other, so that the mapping relationship between the height of the mobile phone and the height of the PC is saved in both the PC and the mobile phone. When the mouse passes from the mobile phone to the PC, the keyboard and mouse module of the mobile phone can send the position where the mouse passes to the keyboard and mouse module of the PC, and the keyboard and mouse module of the PC can calculate the coordinates (x0, y0) after the crossing based on the position where the mouse passes and the mapping relationship.
[0151] In another possible implementation, when the mouse passes from the mobile phone to the PC, the effect of the user dragging the draggable area of the PC's animation window to drive the PC's animation window to move can be presented. For example, the keyboard and mouse module of the PC can set the coordinates of the cursor to the coordinates of any position in the draggable area of the PC's animation window, so that the cursor can be displayed in the draggable area of the PC's animation window, and the effect of the user dragging the draggable area of the PC's animation window to drive the PC's animation window to move can be presented in the PC (not shown in the figure).
[0152] It should be noted that the above Figure 6 The order of the steps shown can be adjusted according to the specific scenario. Figure 6 The steps shown may also be deleted or added in combination with specific scenarios, and not all steps must be performed.
[0153] exist Figure 6 The drag operation shown continues, causing the mouse to pass from the mobile phone to the PC. There are two situations: Situation 1: The user releases the mouse on the PC, the drag operation ends, and the content of the mobile phone floating window is triggered to be projected on the PC; Situation 2: The user does not release the mouse on the PC, the drag operation continues, and the mouse passes from the PC to the mobile phone again. The animated window in the PC is not displayed, and the floating window in the mobile phone is displayed again.
[0154] Combine the following Fig.11 The example shows a schematic diagram of the interaction flow of each module in the mobile phone and PC software system in the above situation one and situation two.
[0155] like Fig.11 As shown, situation one may include S612-S616, specifically:
[0156] S612: The keyboard and mouse module of the PC instructs the keyboard and mouse module of the mobile phone to release the mouse (mouse release).
[0157] When the user drags the floating window in the mobile phone to the PC and releases the mouse, when the dragging operation ends, the keyboard and mouse module of the PC can monitor the mouse up event, and the keyboard and mouse module of the PC can send a mouse up event to the keyboard and mouse module of the mobile phone, indicating that the mouse is released. Subsequently, the keyboard and mouse module of the mobile phone can inject the mouse UP event into the FrameWork of the mobile phone, for example, executing S613 and S614.
[0158] S613: The keyboard and mouse module of the mobile phone instructs the virtual input management to release the mouse.
[0159] Suitably, the keyboard and mouse module of the mobile phone can update the drag state to a first value, indicating that the drag operation is finished.
[0160] S614: The virtual input management instructs the task module to release the mouse.
[0161] Suitably, the virtual input management may update the drag state to a first value, indicating that the drag operation is ended.
[0162] When the task module receives the instruction of mouse release, it can execute the steps related to releasing the floating window. Among them, the steps related to hiding the floating window include, for example: (1) traversing all the child nodes, edges, shadows and other layer nodes of Task, and reparenting to mSurfaceControl. (2) Hide mSurfaceControl. (3) Destroy mHwFreeFormScaleLeash. (4) Execute transaction. (5) Release all animation resources, Input monitoring, etc.
[0163] Traverse all the child nodes, edges, shadows and other layer nodes of Task, reparent to mSurfaceControl, which can be understood as releasing the mirror node of the original root node of the floating window (such as Fig.16 8), redefine the child nodes under the mirror node to the original root node of the floating window (such as Fig.16 Click circle 8) to restore the task in the floating window.
[0164] Hiding mSurfaceControl can prevent the floating window from being displayed on the phone. This is because it takes some time for the PC to start the heterogeneous screen projection. During this period, if the floating window is displayed on the phone, the user will see the floating window displayed on the phone, but the content in the floating window will not be displayed on the PC. However, the display of heterogeneous screen projection from the phone to the PC that users usually know is: before the screen projection window on the PC displays the content of the floating window, the floating window on the phone will not be displayed (for example, the phone displays the desktop, etc.). Therefore, hiding mSurfaceControl above prevents the floating window from being displayed on the phone, which can meet the user's usual experience and improve the user experience.
[0165] Destroying mHwFreeFormScaleLeash and executing transaction can complete the configuration of hiding the floating window. At the same time, it can also release all animation resources, Input monitoring, etc., reducing the occupation of mobile phone resources.
[0166] For example, refer to Fig.16 d, the mobile phone first reparents circles 2 to 7 to circle 1, circles 1 to 7 are hidden, and circle 8 is destroyed. This process will be explained in detail with the help of the diagram and will not be described here.
[0167] S615. The keyboard and mouse module of the PC instructs the screen projection module of the PC to perform heterogeneous screen projection.
[0168] When the keyboard and mouse module of the PC detects a mouse release event, the keyboard and mouse module of the PC can instruct the screen projection module of the PC to start heterogeneous screen projection.
[0169] Furthermore, after the PC's screen projection module starts heterogeneous screen projection, the PC's screen projection module can instruct the mobile phone's task module to start stack shifting. After receiving the instruction to start stack shifting, the mobile phone's task module can create a virtual display (Display), for example, switching the application windowmode to fullscreen.
[0170] Furthermore, the task module of the mobile phone can also move the application Task from the main screen to the virtual display (Display) and send the data of the virtual Display to the PC.
[0171] In addition, the mobile phone's multi-display management can also switch the floating window type to a full-screen display type. The mobile phone's task module can also display the surface of the application in the floating window after completing the stack shift, so that the application in the floating window can be displayed in full screen projection on the PC.
[0172] Alternatively, the multi-display management of the mobile phone can also switch the type of floating window to a full-screen display type, and the task module of the mobile phone can also start a 500ms timer to display the Surface of the application in the floating window, so that the application in the floating window can be displayed in full screen projection on the PC. Among them, 500ms can be replaced by a target duration, or a value larger than the target duration. The target duration can be the duration from the start of heterogeneous screen projection on the PC to the display of the application screen in the floating window on the PC in the projection window, which is not specifically limited in the embodiments of this application.
[0173] S616. The PC displays the projected content.
[0174] It should be noted that after the PC's screen projection module starts heterogeneous screen projection, the display of the animation window can be canceled in the PC and the projection window can be pulled up, wherein the size of the projection window can be greater than or equal to the size of the animation window, the display area of the projection window can cover the area of the animation window, or the center position of the projection window can be the same as or not far from the center position of the animation window.
[0175] After the PC obtains the virtual display data, the PC can display the screen content of the mobile phone in the screen projection window. This allows the mobile phone's floating window to be dragged to the PC, making it easy to realize heterogeneous screen projection on the PC.
[0176] For example, Fig.12 The schematic diagram shows that after the user releases the mouse on the PC, the gallery APP in the mobile phone is projected on the PC by a different source. Among them, the PC can display the floating window of the gallery APP in the projection window 1200. It can be understood that because in the different source projection, the mobile phone transmits the data of the virtual display to the PC, and the data displayed by the mobile phone is not the data of the virtual display, so the content displayed by the mobile phone can be different from the content displayed in the projection window of the PC.
[0177] Optional, in Fig.12 As shown, a control 1201 can also be displayed in the screen projection window of the PC, and the control 1201 can be called a home button. When the home button is triggered, the heterogeneous screen projection of the PC and the mobile phone can be switched to the same source screen projection. At this time, the mobile phone sends the relevant data displayed in the mobile phone to the PC, so that the PC displays the relevant data displayed in the mobile phone in the screen projection window. For example, Fig.13 As shown, after switching to same-source screen projection, the content displayed in the PC's screen projection window 1200 is the same as the content displayed on the mobile phone, thereby conveniently realizing the switch from heterogeneous-source screen projection to same-source screen projection.
[0178] like Fig.11 As shown, situation 2 may include S620-S623, specifically:
[0179] S620. The keyboard and mouse module of the mobile phone instructs the keyboard and mouse module of the PC to transfer the mouse back to the mobile phone.
[0180] During the dragging operation, the mouse may pass through the edge of the PC display screen to the mobile phone, and the keyboard and mouse module of the mobile phone can detect that the mouse passes back to the mobile phone.
[0181] When the mouse is transferred from the PC back to the mobile phone, the keyboard and mouse module of the mobile phone can determine whether the dragging state is the third value. If the dragging state is the third value, the keyboard and mouse module of the mobile phone can update the dragging state to the second value.
[0182] S621. The keyboard and mouse module of the mobile phone instructs the virtual input management to return the mouse to the mobile phone.
[0183] After the virtual input management receives the indication that the mouse is transferred back to the mobile phone, the virtual input management may determine whether the drag state is the third value. If the drag state is the third value, the virtual input management may update the drag state to the second value.
[0184] S622, the virtual input management instructs the task module to put the mouse back into the mobile phone.
[0185] For example, the task module may execute display mFreeFormScaleLeash, and the floating window may continue to be displayed in the mobile phone.
[0186] S623. The PC cancels the display of the dynamic effect window.
[0187] When the drag operation continues, the task locator listens to the input event and continues to receive the mouse move event (x, y). The task can update the real-time coordinate position of mFreeFormScaleLeash, and the floating window position can move with the cursor in the mobile phone.
[0188] It should be noted that when the animation window is continuously dragged to the mobile phone on the PC, the part of the animation window that exceeds the edge of the PC screen is not displayed, and the part of the window that does not exceed the edge of the PC screen is displayed. Fig.14 As shown, when the cursor drags the PC's animated window 1001 close to the edge of the screen (the cursor does not pass back to the PAD), the floating window is hidden and displayed in the mobile phone, and a partial interface diagram of the animated window 1001 is displayed in the PC. As the dragging operation proceeds, the mouse passes from the PC back to the mobile phone.
[0189] After the mouse moves from the PC back to the phone, the floating window animation is displayed on the phone, and the animation window display is canceled on the PC, such as Fig.15 A schematic diagram of an interface showing a floating window animation 801 in a mobile phone and canceling the animation window display in a PC is shown.
[0190] It should be noted that when the mouse passes from the PC to the mobile phone, the initial display position of the floating window in the mobile phone can be implemented differently.
[0191] In a possible implementation, when the mouse passes from the PC to the mobile phone, a dynamic effect window can be dragged out from the PC and when the floating window is displayed on the mobile phone, the position of the mobile phone display edge and the PC dragged edge are not much different.
[0192] For example, the mobile phone can calculate the coordinates (x2, y2) after the cursor passes through, and then the keyboard and mouse module of the mobile phone can set the coordinates of the right vertex of the floating window to (x3, y2±a), where x3 can be a preset value of the mobile phone, x3 can be used to define the distance between the right vertex of the dynamic effect window and the left screen edge of the mobile phone, and a can be a smaller value, because the vertical coordinate of the right vertex of the dynamic effect window of the mobile phone is the same as or not much different from the vertical coordinate of the cursor, so that when the dynamic effect window is dragged out from the PC and the floating window is displayed on the mobile phone, the position of the mobile phone dragging in the edge and the PC dragging out the edge is not much different, for example, combined with Fig.14 , when the animation window 1001 is dragged out from the upper 1 / 3 of the PC screen edge, Fig.15 As shown, the mobile phone's animated window 801 can come out from 1 / 3 of the upper edge of the mobile phone screen, so that the user can get the experience of dragging the window from the PC to the mobile phone smoothly without any lag.
[0193] Among them, one way for a mobile phone to calculate the coordinates (x2, y2) after the cursor passes through is: when the PC and the mobile phone keyboard and mouse are interconnected, the respective screen heights are exchanged with each other, so that the mapping relationship between the height of the PC and the height of the mobile phone is saved in both the mobile phone and the PC. When the mouse passes from the PC to the mobile phone, the keyboard and mouse module of the PC can send the position where the mouse passes to the keyboard and mouse module of the mobile phone, and the keyboard and mouse module of the mobile phone can calculate the coordinates (x2, y2) after the crossing based on the position where the mouse passes and the mapping relationship.
[0194] In another possible implementation, when the mouse passes from the PC to the mobile phone, the cursor can be displayed in the draggable area of the floating window, and the effect of the user dragging the draggable area of the floating window to move the floating window can be presented. For example, the keyboard and mouse module of the mobile phone can set the coordinates of the cursor to the coordinates of any position in the draggable area of the floating window, so that the cursor can be displayed in the draggable area of the floating window, and the effect of the user dragging the draggable area of the floating window to move the floating window can be presented in the mobile phone (not shown in the figure).
[0195] It is understandable that if the mouse is released after it passes back from the PC to the mobile phone, and the dragging operation ends, the mobile phone can exit the dragging animation-related process, clean up the data, and restore the display of the floating window. This embodiment of the present application does not make specific limitations.
[0196] It should be noted that the above Fig.11 The order of the steps shown can be adjusted according to the specific scenario. Fig.11 The steps shown may also be deleted or added in combination with specific scenarios, and not all steps must be performed.
[0197] Next, we will combine Fig.16 Exemplary explanation of the above Figure 6 and Fig.11 During the interaction process, the processing process of the task node in the mobile phone task.
[0198] exist Fig.16 In the figure, circles 1 to 8 are all task nodes of the application in the floating window (such as the above-mentioned gallery APP). When circles 1 to 8 are dark numbers, it can be said that the node is in the display state. When circles 1 to 8 are light numbers, it can be said that the node is in the hidden state. Among them, circle 1 can represent the root layer of the surface control task. Circles 2 and 3 can represent subtask1, which is a container class and has no real data buffer queue. Circles 4 and 6 can represent activity records, which have real data buffer queues. Circles 5 and 7 can represent the window edge outline. Circle 8 can represent the above-mentioned mFreeFormScaleLeash.
[0199] When a floating window is displayed on the phone and there is no operation to drag the floating window, such as Fig.16 As shown in a, circles 1 to 7 are displayed, and circle 8 has not been created.
[0200] When the user drags the floating window on the phone, the floating window animation is displayed on the phone, such as Fig.16 As shown in b, circle 8 is created, and circles 2 to 7 are reparented to circle 8. Circles 2 to 8 are displayed. Among them, circle 1 is retained but cannot be displayed. When dragging the floating window on the phone, circle 8 supports moving with the cursor, and circle 1 is retained but cannot be dragged.
[0201] When the user's dragging operation continues and the mouse crosses to the PC, the floating window animation effect is not displayed on the mobile phone, such as Fig.16 As shown in c, circles 2 to 8 are hidden, and circle 1 is retained but cannot be displayed.
[0202] Afterwards, corresponding to the above situation 1, after the mouse passes to the PC, when the user releases the mouse on the PC, the floating window animation effect is not displayed on the mobile phone, such as Fig.16 As shown in d, the phone first reparents circles 2 to 7 to circle 1, circles 1 to 7 are hidden, circle 8 is destroyed, and then the phone moves the application Task from the main screen to the virtual display (Display), as shown in Fig.16As shown in a, mobile phone circles 1 to 7 are set to display status to realize heterogeneous screen projection display from mobile phone to PC.
[0203] Corresponding to the above situation 2, after the mouse passes to the PC, and then passes back to the mobile phone from the PC, the mobile phone continues to display the floating window animation, such as Fig.16 As shown in b, circles 2 to 8 are displayed. Among them, circle 1 is reserved but cannot be displayed.
[0204] In this way, while the expansion operation is ongoing, the drag operation can act on the newly created circle 8 without interfering with the execution logic of circle 1, thereby improving code security.
[0205] Of course, in a practical implementation, it is also possible not to create circle 8, so that there is no such Fig.16 In this possible implementation, when a floating window is displayed on the mobile phone, such as Fig.16 As shown in a, circles 1 to 7 are display states. When the user drags the floating window on the phone, the floating window animation is displayed on the phone. Circles 1 to 7 are display states. When the user's dragging operation continues and the mouse crosses to the PC, the floating window animation is not displayed on the phone, such as Fig.16 As shown in d, circles 1 to 7 are in a hidden state. Further, in the above situation 1, the mobile phone moves the application Task from the main screen to the virtual display (Display), such as Fig.16 As shown in a, mobile phone circles 1 to 7 are set to display state to realize heterogeneous screen projection display of mobile phone to PC. In the above situation 2, when the floating window is displayed on the mobile phone, such as Fig.16 As shown in a, circles 1 to 7 are display status.
[0206] Understandably, Fig.16 A tree node including 7 nodes is exemplarily shown. In possible implementations, the tree node may have more or fewer nodes. The embodiments of the present application do not specifically limit the tree node.
[0207] The above exemplifies the software interaction process of the floating window dragging method of the present application in combination with the various software modules in the mobile phone and the PC. The following will continue to explain in detail the floating window dragging method of the embodiment of the present application in combination with the step flow.
[0208] For example, Fig.17 A flowchart of a floating window dragging method provided in an embodiment of the present application is shown.
[0209] The floating window dragging method of the embodiment of the present application can be applied to a communication system, which includes a first electronic device installed with a first operating system and a second electronic device installed with a second operating system, the first electronic device or the second electronic device is connected to an input device, and the first operating system is different from the second operating system.
[0210] The communication system can refer to Figure 1 and Figure 2 For the description of the first electronic device and the second electronic device, reference can be made to the description of the above embodiments and no further details are given.
[0211] like Fig.17 As shown, the method includes:
[0212] S1701. The first electronic device displays a first cursor and a floating window of a first application, where the first cursor is located on the floating window and a desktop is displayed below the floating window.
[0213] For example, S1701 may correspond to Figure 7 The first cursor may correspond to the cursor in the interface, and no further description is given. It can be understood that in the embodiment of the present application, the first application may correspond to the target application corresponding to the content displayed in the floating window of the above embodiment, and the first application may be any application without limitation.
[0214] S1702: When the user uses an input device to control a first cursor to select and drag the floating window, the floating window moves with the first cursor.
[0215] For example, S1702 may correspond to Figure 8 Description of the display interface.
[0216] S1703. During the process of the first cursor dragging the floating window, when the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device displays the desktop and stops displaying the floating window, and the second electronic device displays the animation window dragged by the first cursor, and the animation window includes the logo of the first application.
[0217] In the embodiment of the present application, the motion effect window can be understood as a motion effect window displayed in the second electronic device, and the second motion effect window includes an identifier of the first application, and the identifier includes, for example, an icon and / or a name of the first application.
[0218] For example, S1703 may correspond to Figure 8 , Fig. 9 and Fig.10 According to the relevant description, the animation window may be animation window 1001.
[0219] S1704. During the process of the first cursor dragging the animation window, when the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device displays the floating window dragged by the first cursor, the lower layer of the floating window displays the desktop, and the second electronic device stops displaying the animation window.
[0220] For example, S1704 may correspond to Fig.14 and Fig.15 The relevant description is not repeated here.
[0221] In an embodiment of the present application, it is possible to support a process in which a floating window of a first electronic device is dragged to a second electronic device, an animated window is displayed in the second electronic device, and then the animated window of the second electronic device is dragged to the first electronic device, and the floating window continues to be displayed in the first electronic device, thereby increasing the richness of device interaction.
[0222] It is understandable that in Fig.17 Based on the embodiments of the present application, there are some possible implementations of the embodiments, and each possible implementation may also correspond to some expressions in the above embodiments, and similar contents will not be repeated here.
[0223] In one possible implementation, when the first cursor moves from a first position at the edge of the first screen to an edge of the second screen, the first cursor enters the second electronic device from a second position at the edge of the second screen and starts dragging the animation window from the second position; when the first cursor moves from a third position at the edge of the second screen to an edge of the first screen, the first cursor enters the first electronic device from the first position and starts dragging the floating window from the first position, and the third position is different from the second position.
[0224] In the embodiment of the present application, the first position can be any position on the edge of the screen of the first electronic device, because after the cursor passes from the first electronic device to the second electronic device, the floating window can be hidden at the first position when the cursor passes, and after the cursor passes from the second electronic device back to the first electronic device, the floating window can be displayed at the first position when the cursor passes, and the cursor is also displayed in the draggable area of the floating window, which can present the effect of the cursor dragging the floating window, and the floating window passes out from somewhere on the first electronic device and then passes back from somewhere on the first electronic device. The second position and the third position can be any position on the edge of the screen of the second electronic device, as long as the second position and the third position are different. For details, please refer to Fig.11 The description of the embodiments is omitted here.
[0225] In a possible implementation, when the first cursor moves from the third position of the second screen edge to the first screen edge, the first electronic device sets the ordinate of the first cursor to the first ordinate, and the difference between the first ordinate and the ordinate of the first position is less than a certain value. The certain value may be a small value, and is not limited to this. In this way, the return position of the first cursor can be obtained conveniently by the coordinates of the first position.
[0226] In one possible implementation, when the first cursor moves from the fourth position of the first screen edge to the second screen edge, the first cursor enters the second electronic device from the fifth position of the second screen edge and starts to drag the animation window from the fifth position; when the first cursor moves from the sixth position of the second screen edge to the first screen edge, the first cursor enters the first electronic device from the seventh position and starts to drag the floating window from the seventh position; wherein the difference between the first ratio and the second ratio is less than the first threshold, the first ratio is the ratio of the distance from the sixth position to one end of the second screen edge to the second height value, and the second ratio is the ratio of the distance from the seventh position to one end of the first screen edge to the first height value; the first height value is the height of the first screen edge, and the second height value is the height of the second screen edge.
[0227] In the embodiment of the present application, the fourth position and the seventh position may be any position on the edge of the screen of the first electronic device, and the fourth position and the seventh position may be the same or different. The fifth position and the sixth position may be any position on the edge of the screen of the second electronic device, and the fifth position and the sixth position may be the same or different.
[0228] The first ratio and the second ratio are only used to describe the corresponding relationship between the sixth position and the seventh position. The first electronic device and the second electronic device may not calculate the first ratio, the second ratio and the values related to these two ratios. The first threshold value may be a smaller value and is not limited.
[0229] One end of the second screen edge and one end of the first screen edge may be the same end. For example, when one end of the second screen edge is the upper end of the screen edge of the second electronic device, one end of the first screen edge is also the upper end of the screen edge of the first electronic device. Alternatively, when one end of the second screen edge is the lower end of the screen edge of the second electronic device, one end of the first screen edge is also the lower end of the screen edge of the first electronic device.
[0230] In this way, when an animated window is dragged out from the second electronic device and a floating window is displayed on the first electronic device, the position of the display edge of the first electronic device and the dragged edge of the second electronic device are not much different, so that the user can get the experience of dragging the window from the second electronic device to the first electronic device smoothly without any lag.
[0231] In one possible implementation, when the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device obtains the second vertical coordinate after the first cursor passes through, and sets the vertical coordinate of the vertex of the floating window to the third vertical coordinate, and the difference between the third vertical coordinate and the second vertical coordinate is less than the second threshold.
[0232] In the embodiment of the present application, the second threshold value can be a smaller value and is not limited. Fig.11 In this way, the position of the floating window can be easily obtained by calculating the cursor coordinates.
[0233] In one possible implementation, the view of the floating window includes a root node and child nodes; when the first cursor starts to drag the floating window, the first electronic device creates a mirror node of the root node and mounts the child node to the mirror node, the mirror node is displayed as the first cursor is dragged, and the root node is not displayed as the first cursor is dragged; when the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device hides the mirror node; when the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device displays the mirror node.
[0234] The embodiments of this application can refer to Figure 6 , Fig.11 and Fig.16 The relevant descriptions of the corresponding embodiments are omitted here.
[0235] Because the content displayed by the mirror node is the same as the content displayed by the original floating window, the floating window content seen by the user in the mobile phone interface does not change, which improves the user experience. In addition, in the embodiment of the present application, the floating window animation is dragged during the floating window dragging process, rather than directly dragging the floating window, which reduces the interference with the control logic of the application displayed in the floating window and improves the software security during the dragging process.
[0236] In one possible implementation, during the process of the first cursor dragging the animation window, when it is detected that the user releases the first cursor at the eighth position through the input device, the second electronic device displays the projection window at the eighth position and stops displaying the animation window. The content of the projection window is partially or completely the same as the content of the floating window, and the first electronic device displays the desktop.
[0237] In the embodiment of the present application, the eighth position may be any position on the display screen of the second electronic device, and the projection window may be a window in the second electronic device for displaying the projection content of the first application.
[0238] It is understandable that it takes some time for the second electronic device to pull up the projection window and display the content of the first application in the projection window. During this period of time, the projection window of the second electronic device may display projection animations or black screen masks, and the desktop can be displayed in the first electronic device. In this way, the user can conveniently implement heterogeneous screen projection of the first application in the second electronic device by dragging the floating window of the first electronic device to the second electronic device.
[0239] In a possible implementation, when detecting that the user releases the first cursor at the eighth position through the input device, the second electronic device also sends a cursor release event to the first electronic device; in response to the cursor release event, the first electronic device also remounts the child node to the root node, destroys the mirror node, and hides the root node; and the first electronic device also performs stack shifting, and when the first electronic device completes the stack shifting, the first electronic device displays the root node. In this way, the control of the floating window by the first application can be restored. For details, please refer to Figure 6 , Fig.11 and Fig.16 The description of the corresponding embodiments is omitted here.
[0240] In a possible implementation, before the first electronic device performs stack shifting, the first electronic device also switches the first application from floating window mode to full screen mode. In this way, full screen projection of the first application in the second electronic device can be achieved.
[0241] In one possible implementation, the first electronic device also maintains a drag state value, and the drag state value includes a first value, a second value and a third value; when the user controls the first cursor to select and drag the floating window through an input device, the first electronic device updates the drag state value from the first value to the second value; when the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device updates the drag state value from the second value to the third value; in response to a cursor release event, the first electronic device updates the drag state value from the third value to the first value.
[0242] The maintenance of the drag state can be referred to Figure 6 and Fig.11 The description of the corresponding embodiment is omitted. In this way, by setting the drag state, when a mouse crossing occurs, the electronic device can determine whether the mouse crossing is a cursor crossing when there is no drag event (for example, the user does not press the mouse, but only moves the mouse to cross between electronic devices), or a cursor dragging window crossing when there is a drag event (for example, the user presses the mouse in the floating window, and moves the mouse to drag the floating window to cross between electronic devices).
[0243] In one possible implementation, when a first cursor moves from a first screen edge of a first electronic device to a second screen edge of a second electronic device, if the first electronic device determines that the value of the drag state is a second value, the first electronic device also sends information for indicating a display window to the second electronic device; the second electronic device displays the animation window dragged by the first cursor, including: in response to the information for indicating a display window, the second electronic device displays the animation window dragged by the first cursor.
[0244] In a possible implementation, when the user uses the input device to control the first cursor to select and drag the floating window, the first electronic device monitors the operation of dragging the draggable area of the floating window; the first electronic device registers an input event monitor, and the input event monitor is used to monitor the moving event. The specific implementation of this process can be referred to Figure 6 and Fig.11 The description of the corresponding embodiment is omitted. In this way, when the subsequent drag operation continues, the cursor move event can be monitored through the input event monitor, and there is no need to call the moving task every time, saving computing resources.
[0245] In a possible implementation, when the user uses an input device to control the first cursor to select and drag the floating window, the first electronic device also sends identification information of the first application to the second electronic device, and the identification information includes: application package name, application name and / or application icon. In this way, when the cursor subsequently drags the floating window from the first electronic device to the second electronic device, the second electronic device can promptly draw the dynamic effect window based on the application package name, application name and / or application icon, so that the user can have the experience of dragging the floating window to the second electronic device.
[0246] In a possible implementation, when detecting that the user releases the first cursor at the eighth position through the input device, the first electronic device further cancels the input event monitoring, thereby releasing computing resources.
[0247] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.
[0248] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0249] The floating window dragging method of the embodiment of the present application has been described above, and the device for executing the above floating window dragging method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above list sorting method.
[0250] In order to achieve the above functions, the device for implementing the dragging of the floating window includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the method steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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 this application.
[0251] The embodiment of the present application can divide the functional modules of the device for implementing the floating window dragging method according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0252] like Fig.18 A schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip 180 includes one or more (including two) processors 1801 , a communication line 1802 , a communication interface 1803 and a memory 1804 .
[0253] In some implementations, the memory 1804 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
[0254] The method described in the above embodiment of the present application can be applied to the processor 1801, or implemented by the processor 1801. The processor 1801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 1801. The above processor 1801 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 1801 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.
[0255] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1804, and the processor 1801 reads the information in the memory 1804 and completes the steps of the above method in combination with its hardware.
[0256] The processor 1801 , the memory 1804 , and the communication interface 1803 may communicate with each other via the communication line 1802 .
[0257] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
[0258] The embodiment of the present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0259] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.
[0260] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers.
[0261] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
Claims
1. A floating window dragging method, characterized in that: Applied to a communication system, the communication system includes a first electronic device installed with a first operating system and a second electronic device installed with a second operating system, the first electronic device or the second electronic device is connected to an input device, the first operating system is different from the second operating system, and the method includes: The first electronic device displays a first cursor and a floating window of a first application, the first cursor is located on the floating window, and a desktop is displayed on a lower layer of the floating window; When the user controls the first cursor to select and drag the floating window through the input device, the floating window moves with the first cursor; In the process of dragging the floating window by the first cursor, when the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device displays the desktop, stops displaying the floating window, and the second electronic device displays the dynamic effect window dragged by the first cursor, and the dynamic effect window includes the logo of the first application; During the process of the first cursor dragging the animation window, when the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device displays the floating window dragged by the first cursor, the lower layer of the floating window displays the desktop, and the second electronic device stops displaying the animation window.
2. The method according to claim 1, characterized in that When the first cursor moves from the first position of the first screen edge to the second screen edge, the first cursor enters the second electronic device from the second position of the second screen edge, and starts to drag the animation window from the second position; When the first cursor moves from the third position of the second screen edge to the first screen edge, the first cursor enters the first electronic device from the first position and starts to drag the floating window from the first position, and the third position is different from the second position.
3. The method according to claim 2, characterized in that When the first cursor moves from the third position of the second screen edge to the first screen edge, the first electronic device sets the vertical coordinate of the first cursor to the first vertical coordinate, and the difference between the first vertical coordinate and the vertical coordinate of the first position is less than a certain value.
4. The method according to claim 1, characterized in that: When the first cursor moves from the fourth position of the first screen edge to the second screen edge, the first cursor enters the second electronic device from the fifth position of the second screen edge, and starts to drag the motion effect window from the fifth position; When the first cursor moves from the sixth position of the second screen edge to the first screen edge, the first cursor enters the first electronic device from the seventh position, and starts to drag the floating window from the seventh position; Among them, the difference between the first ratio and the second ratio is less than a first threshold value, the first ratio is the ratio of the distance from the sixth position to one end of the second screen edge to the second height value, and the second ratio is the ratio of the distance from the seventh position to one end of the first screen edge to the first height value; the first height value is the height of the first screen edge, and the second height value is the height of the second screen edge.
5. The method according to claim 4, characterized in that When the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device obtains the second vertical coordinate after the first cursor passes through, and sets the vertical coordinate of the vertex of the floating window to the third vertical coordinate, and the difference between the third vertical coordinate and the second vertical coordinate is less than a second threshold.
6. The method according to any one of claims 1 to 5, characterized in that: The view of the floating window includes a root node and child nodes; When the first cursor starts to drag the floating window, the first electronic device creates a mirror node of the root node and mounts the child node to the mirror node, the mirror node is displayed as the first cursor is dragged, and the root node is not displayed as the first cursor is dragged; When the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device hides the mirror node; When the first cursor moves from the second screen edge of the second electronic device to the first screen edge of the first electronic device, the first electronic device displays the mirror node.
7. The method according to any one of claims 1 to 6, characterized in that: Also includes: During the process of dragging the animation window with the first cursor, when it is detected that the user releases the first cursor at the eighth position through the input device, the second electronic device displays the projection window at the eighth position and stops displaying the animation window. The content of the projection window is partially or completely the same as the content of the floating window, and the first electronic device displays the desktop.
8. The method according to claim 7, characterized in that When detecting that the user releases the first cursor at the eighth position through the input device, the second electronic device further sends a cursor release event to the first electronic device; In response to the cursor release event, the first electronic device also remounts the child node to the root node, destroys the mirror node, and hides the root node; and the first electronic device also performs stack shifting. When the first electronic device completes stack shifting, the first electronic device displays the root node.
9. The method according to claim 8, characterized in that Before the first electronic device performs stack shifting, the first electronic device also switches the first application from a floating window mode to a full screen mode.
10. The method according to any one of claims 7 to 9, characterized in that: The first electronic device further maintains a drag state value, wherein the drag state value includes a first value, a second value, and a third value; When the user controls the first cursor to select and drag the floating window through the input device, the first electronic device updates the value of the drag state from the first value to the second value; When the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, the first electronic device updates the value of the drag state from the second value to the third value; In response to the cursor release event, the first electronic device updates the value of the drag state from the third value to the first value.
11. The method according to claim 10, characterized in that When the first cursor moves from the first screen edge of the first electronic device to the second screen edge of the second electronic device, if the first electronic device determines that the value of the drag state is the second value, the first electronic device further sends information for indicating a display window to the second electronic device; The second electronic device displays the animation window dragged by the first cursor, comprising: in response to the information for indicating a display window, the second electronic device displays the animation window dragged by the first cursor.
12. The method according to any one of claims 1 to 11, characterized in that: When the user controls the first cursor to select and drag the floating window through the input device, the first electronic device detects an operation of dragging the draggable area of the floating window; The first electronic device registers an input event monitor, and the input event monitor is used to monitor movement events.
13. The method according to claim 12, characterized in that When the user controls the first cursor to select and drag the floating window through the input device, the first electronic device also sends identification information of the first application to the second electronic device, and the identification information includes: application package name, application name and / or application icon.
14. The method according to claim 12 or 13, characterized in that When detecting that the user releases the first cursor at the eighth position through the input device, the first electronic device also cancels the input event monitoring.
15. A communication system, characterized in that: The communication system includes a first electronic device installed with a first operating system and a second electronic device installed with a second operating system, the first electronic device or the second electronic device is connected to an input device, the first operating system is different from the second operating system, the first electronic device executes the method executed by the first electronic device as described in any one of claims 1-14, or the second electronic device executes the method executed by the second electronic device as described in any one of claims 1-14.
16. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method executed by the first electronic device as described in any one of claims 1-14, or executes the method executed by the second electronic device as described in any one of claims 1-14.
17. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method performed by the first electronic device as described in any one of claims 1 to 14 is implemented, or the method performed by the second electronic device as described in any one of claims 1 to 14 is implemented.
18. A computer program product, characterized in that It comprises a computer program, which, when being executed, enables a computer to execute the method executed by the first electronic device as claimed in any one of claims 1 to 14, or to execute the method executed by the second electronic device as claimed in any one of claims 1 to 14.