Method for displaying desktop element and electronic device

CN116391167BActive Publication Date: 2026-07-24GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU SHIYUAN ELECTRONICS CO LTD
Filing Date
2022-06-30
Publication Date
2026-07-24

Smart Images

  • Figure CN116391167B_ABST
    Figure CN116391167B_ABST
Patent Text Reader

Abstract

A desktop element display method and an electronic device, wherein the desktop element display method is applied to an operating system of the electronic device, a desktop of the operating system comprises desktop elements, the desktop element display method comprises: receiving a top instruction for a desktop element (S21); creating a floating window container for the desktop element according to the top instruction (S22); moving the desktop element from the desktop to the floating window container (S23); and displaying the desktop element in the floating window container on an upper layer of an interface displayed in the desktop (S24), so that user operation is more convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of display technology, and more specifically to a method for displaying desktop elements and an electronic device. Background Technology

[0002] In some technologies, the operating system desktop can include desktop elements. Desktop elements are used to display desktop objects. These desktop objects include, but are not limited to, application icons displayed on the desktop, and the display interfaces of desktop tools (such as the display interface of a desktop weather tool or a desktop clock tool). A desktop element can display one or more desktop objects.

[0003] Typically, the desktop interface is positioned on top of desktop elements, which can obscure desktop elements when the interface is present. Currently, users need to close or minimize the desktop interface and return to the desktop to view or interact with desktop elements. Clearly, the current method for manipulating desktop elements is cumbersome. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method for displaying desktop elements and an electronic device that can simplify user operations.

[0005] This invention provides a method for displaying desktop elements, the method being applied to an operating system of an electronic device, wherein the desktop of the operating system includes desktop elements, and the method includes:

[0006] Receive the command to bring the desktop element to the top;

[0007] Create a floating window container for the desktop element according to the pin command;

[0008] Move the desktop element from the desktop to the floating window container; and

[0009] The desktop elements displayed in the floating window container are positioned on top of the interface displayed on the desktop.

[0010] In some embodiments, creating a floating window container for the desktop element includes:

[0011] Determine the desktop coordinates of the desktop element, where the desktop coordinates refer to the coordinate position of the desktop element in the grid coordinate system of the desktop, and the grid coordinate system is established based on the grid matrix of the desktop;

[0012] The desktop coordinates of the desktop element are converted into screen coordinates. The screen coordinates refer to the coordinate position of the desktop element in the screen coordinate system of the desktop. The screen coordinate system is established based on the screen resolution.

[0013] Create the floating window container within the area defined by the screen coordinates.

[0014] In some embodiments, after creating the floating window container, the method further includes:

[0015] If a command to close the floating window is received, the desktop element is removed from the floating window container and restored to the desktop.

[0016] In some embodiments, before moving the desktop element from the desktop to the floating window container, the method further includes:

[0017] Store the desktop coordinates of the desktop element as the element's desktop coordinates;

[0018] Restoring the desktop elements to the desktop includes:

[0019] Determine if there is content in the area defined by the desktop coordinates of the element. If not, restore the desktop element to the area defined by the desktop coordinates of the element.

[0020] In some embodiments, the method further includes:

[0021] If the area defined by the desktop coordinates of the element contains content, the desktop element is restored to an empty area on the desktop.

[0022] In some embodiments, after restoring the desktop element to the region defined by the element's desktop coordinates, the method further includes:

[0023] If the size of the desktop element is not the same as the size of the area defined by the desktop coordinates, adjust the size of the desktop element so that it matches the size of the area defined by the desktop coordinates.

[0024] In some embodiments, after moving the desktop element from the desktop to the floating window container, the method further includes:

[0025] In response to a floating window adjustment command, the window size of the floating window container is adjusted to adjust the size of the desktop element; and / or

[0026] In response to a window move command, the floating window container is moved from its current location to another area of ​​the desktop to display the desktop elements in that other area.

[0027] In some embodiments, the floating window container includes a normal display state and a minimized display state, wherein the normal display state refers to the state in which the window of the floating window container is displayed on the desktop, and the minimized display state refers to the state in which the floating window container remains running, but the corresponding window is not displayed on the desktop;

[0028] After moving the desktop element from the desktop to the floating window container, the method further includes:

[0029] When a minimize command is received or when the current interface displayed on the desktop is a preset interface, the floating window container is adjusted from the normal display state to the minimized display state.

[0030] In another aspect, the present invention provides an electronic device, the electronic device having an operating system, the desktop of the operating system including desktop elements; the electronic device includes:

[0031] A touchscreen for displaying the desktop and receiving commands to bring desktop elements to the top; and

[0032] A processor is configured to create a floating window container for the desktop element according to the top instruction, move the desktop element from the desktop to the floating window container, and place the desktop element displayed in the floating window container on top of the interface displayed on the desktop.

[0033] In another aspect, the present invention provides an electronic device connected to a display device, the electronic device having an operating system, the desktop of the operating system including desktop elements, and the desktop of the operating system being displayed through the display device; the electronic device includes:

[0034] A communication module is configured to communicate with the display device and receive a command from the display device to bring the desktop element to the top; and

[0035] The processor is configured to generate control instructions based on the top placement instruction, and send the control instructions to the display device through the communication module, so as to control the display device to create a floating window container for the desktop element, move the desktop element from the desktop to the floating window container, and place the desktop element displayed in the floating window container on top of the interface displayed on the desktop.

[0036] In another aspect, the present invention provides an electronic device comprising a processor and a memory, the memory being used to store a computer program which, when executed by the processor, implements the method described above.

[0037] In the technical solutions provided by the above embodiments of this application, based on the pinning command, desktop elements can be added to the floating window container, so that the desktop elements are displayed on the top layer of each interface. In this way, users can operate desktop elements without closing or minimizing other display interfaces on the desktop, making user operation more convenient. Attached Figure Description

[0038] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:

[0039] Figure 1 This shows a diagram of desktop elements in a desktop.

[0040] Figure 2 A flowchart illustrating a method for displaying desktop elements according to an embodiment of this application is shown;

[0041] Figure 3 A schematic diagram illustrating the process of creating a floating window container according to an embodiment of this application is shown;

[0042] Figure 4 This illustration shows a desktop diagram in a grid coordinate system according to an embodiment of this application;

[0043] Figure 5 This illustration shows a schematic diagram of a desktop including a floating window container in one state, according to an embodiment of this application.

[0044] Figure 6 It shows Figure 5 A diagram illustrating the desktop in another state;

[0045] Figure 7 This illustration shows a schematic diagram of a desktop including a floating window container in one state, according to another embodiment of this application.

[0046] Figure 8 It shows Figure 7 A diagram illustrating the desktop in another state;

[0047] Figure 9 This illustration shows a schematic diagram of a desktop including a floating window container in one state, according to another embodiment of this application.

[0048] Figure 10 It shows Figure 9 A diagram illustrating the desktop in another state;

[0049] Figure 11 This illustration shows a schematic diagram of desktop elements restored to the desktop according to an embodiment of this application;

[0050] Figure 12 A schematic diagram of a module of an electronic device provided in one embodiment of this application is shown;

[0051] Figure 13 A schematic diagram of a module of an electronic device provided in another embodiment of this application is shown;

[0052] Figure 14 A schematic diagram of an electronic device provided in another embodiment of this application is shown. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] In some embodiments of this application, desktop elements typically display at least one desktop object (such as the display interface of a desktop weather tool or an application launch icon). When a desktop element displays multiple desktop objects, it can also be used to define the layout between the desktop objects. See details... Figure 1 This is a diagram illustrating desktop elements within a desktop. Figure 1 The desktop shown includes desktop element A and desktop element B. Desktop element A displays desktop object 1, desktop object 2, and desktop object 3, and defines the layout between desktop object 1, desktop object 2, and desktop object 3. Desktop element B displays desktop object 4. When operations are performed on desktop elements, operations are also performed on the desktop objects displayed by those elements. For example, when moving... Figure 1 When desktop element A is in the context of desktop elements, all desktop objects included in desktop element A are moved simultaneously.

[0055] Desktop elements can generally be divided into two categories. One category consists of desktop elements provided by the desktop process, such as those containing one or more application icons. The functionality of these elements is provided by the desktop process, which can actively control and manipulate them. The other category comprises desktop elements registered with the desktop process by other element processes and displayed on the desktop. The functionality of these elements is provided by the element process and is not directly related to the desktop process. The desktop process can control and manipulate these elements based on information provided by the element process. For example, suppose… Figure 1The element process corresponding to desktop element B is element process B. If element process B needs to update the display color of desktop element B to blue, then element process B can send blue information to the desktop process, and the desktop process will update the display color of desktop element B to blue according to the blue information sent by element process B.

[0056] Currently, when users are displaying content on their desktop, they need to close or minimize the content display interface before accessing the desktop to view or manipulate desktop elements. For example, when presenting a PowerPoint presentation on a smart interactive whiteboard, to manipulate desktop elements, the user must first close or minimize the PowerPoint presentation and then operate the desktop elements. This makes the process cumbersome and inconvenient for users. Furthermore, some electronic devices have large screens, ranging from 65 to 98 inches. This can also cause inconvenience when closing or minimizing the content display interface. For instance, the button to close or minimize the content display interface might be on the right side of the screen, but the user is on the left. The user needs to move from the left to the right side of the screen to close or minimize the content display interface and view or manipulate desktop elements, which is also inconvenient for users.

[0057] Therefore, this application provides a method for displaying desktop elements, which can be applied to the operating system of an electronic device, wherein the desktop of the operating system includes desktop elements. The electronic device may include a smart interactive whiteboard, audio equipment, desktop computer, laptop, smartphone, smart wearable device (virtual reality glasses, smartwatch, etc.), etc.

[0058] Please see Figure 2 This is a flowchart illustrating a method for displaying desktop elements according to an embodiment of this application. The method for displaying desktop elements includes steps S21 and S24.

[0059] Step S21: Receive the command to bring desktop elements to the top.

[0060] In some embodiments, before displaying content on the desktop (e.g., before presenting a PowerPoint presentation), to avoid obscuring desktop elements, users can pre-select desktop elements by touching or long-pressing to bring up a menu list corresponding to the selected element, and then select the "Pin to Top" option from the menu list. This allows sending a "Pin to Top" command to the smart interactive whiteboard. The "Pin to Top" command can be used to control the smart interactive whiteboard to display the selected desktop element on top of the desktop (i.e., above other interfaces on the desktop).

[0061] It is understood that the above is only one way to send a pin command and does not constitute a limitation of this application. For example, in some embodiments, the display interface of the smart interactive flat panel may include a pin button. After selecting a desktop element, the user can send a pin command to the smart interactive flat panel by touching the pin button, controlling the smart interactive flat panel to display the selected desktop element on top of the desktop.

[0062] Step S22: Create a floating window container for the desktop element according to the pinning instruction.

[0063] In some embodiments, a floating window container can refer to a container used to hold desktop elements. That is, desktop elements are placed in a floating window container and displayed on the desktop.

[0064] In some embodiments, considering the operating system, such as Android, a software development kit (SDK) is provided. The SSD can provide functional interfaces for creating floating windows. Therefore, when creating a floating window container for a desktop element, the operating system's functional interfaces can be called. This reduces the amount of code development. Of course, it is understood that the desktop element display method of this application also supports creating floating window containers in other ways. For example, if the operating system's SSD does not provide functional interfaces for creating floating windows, a self-developed software program can be run to create the floating window container. This application does not limit the method of creating floating window containers.

[0065] The following description uses the floating window container creation process in one embodiment as an example.

[0066] Please see Figure 3 Creating a floating window container for desktop elements may include steps S211 to S213.

[0067] Step S211: Determine the desktop coordinates of the desktop element. Desktop coordinates refer to the coordinate position of the desktop element in the grid coordinate system of the desktop. The grid coordinate system is established based on the grid matrix of the desktop.

[0068] First, let's explain the grid coordinate system. Please refer to [link / reference needed]. Figure 4 This is a schematic diagram of a desktop in a grid coordinate system according to an embodiment of this application. A grid coordinate system can refer to dividing a desktop into an m*n grid matrix. The distances of this grid matrix from the edge of the desktop are d1, d2, d3, and d4, respectively. The grid at the top left corner of the grid matrix is ​​taken as the grid with coordinates (0, 0), and the coordinates are encoded sequentially to the right and downwards from this grid to obtain the resulting coordinate system. Here, m and n are integers greater than or equal to 1. For example... Figure 4 In this context, m takes the value 16, and n takes the value 10. The values ​​d1, d2, d3, and d4 mentioned above are values ​​greater than or equal to 0.

[0069] exist Figure 4 In the grid coordinate system, the X-axis represents the width, and the Y-axis represents the height. A desktop element occupies at least one grid cell and at most m*n grid cells. The top-left corner of the desktop element can be considered its origin. The desktop coordinates of a desktop element can include its origin, width, and height in the grid coordinate system. Width refers to the number of grid cells occupied by the desktop element in the width direction, and height refers to the number of grid cells occupied by the desktop element in the height direction. Typically, width and height are integers greater than or equal to 1, meaning that desktop elements are displayed on the desktop with grid cells as the smallest unit.

[0070] Based on the above description, assuming Figure 4 The area within the bold black box represents the location of a desktop element in a grid coordinate system. The origin of this desktop element is (x, y), its width is `width`, and its height is `height`. Therefore, from... Figure 4 As can be seen, x is 2, y is 1, width is 11, and height is 4. This allows us to define the area and position of a desktop element on the desktop.

[0071] Step S212: Convert the desktop coordinates of the floating window container to screen coordinates. Screen coordinates refer to the coordinate positions of desktop elements in the screen coordinate system of the desktop. The screen coordinate system is established based on the screen resolution.

[0072] In some embodiments, converting the desktop coordinates of the floating window container to screen coordinates mainly refers to converting coordinates determined based on a grid coordinate system to coordinates determined based on the screen resolution. This is illustrated below with examples.

[0073] Please continue reading. Figure 4 Assuming Figure 4 In the grid coordinate system, d1, d2, d3, and d4 are all 0. The number of grid cells in the width direction is 16, and the number of grid cells in the height direction is 10. The screen resolution is 3840px * 2160px. The origin coordinates of the desktop element in the screen coordinate system are (x1, y1), the width is width1, and the height is height1.

[0074] Based on the above assumptions, and calculating according to screen resolution, the width of a single cell in the grid coordinate system is 3840 / 16 = 240px, and the height is 2160 / 10 = 216px. Furthermore, we can conclude that:

[0075] x1=x*240px=2*240px=480px

[0076] y1=y*216px=1*216px=216px,

[0077] width1=width*240px=4*240px=960px

[0078] height1=height*216px=2*216px=432px

[0079] In this way, the screen coordinates of the desktop elements can be obtained.

[0080] Step S213: Create a floating window container within the area defined by screen coordinates.

[0081] In some embodiments, the size of the floating window container is the same as the size of the area defined by screen coordinates. In other embodiments, the size of the floating window container may be smaller than the size of the area defined by screen coordinates.

[0082] Understandable Figure 3 The process for creating a floating window container is merely an exemplary process and does not constitute a limitation on this application. For example, in some embodiments, if the coordinates of the desktop element are determined based on the screen coordinate system, then steps S211 and S212 may not be included in the above process for creating a floating window container. In another embodiment, the floating window container can be created based on the desktop coordinates of the desktop element, then step S212 may not be included in the above process for creating a floating window container, and in step S213, the floating window container may be created within the area defined by the desktop coordinates.

[0083] It is also understandable that Figure 3 Creating the floating window container within the area where the desktop element is located is one example. Obviously, the floating window container can also be created outside the area where the desktop element is located; for example, it can be created in the upper right corner or side area of ​​the display screen. This application does not restrict the creation location of the floating window container.

[0084] Step S23: Move the desktop element from the desktop to the floating window container.

[0085] In some embodiments, after the floating window container is created, the desktop element can be selected and moved into the floating window container by dragging.

[0086] In other embodiments, for cases where a floating window container is created by touching or long-pressing to select a desktop element, the desktop element selected by touching or long-pressing can be automatically moved into the floating window container after it is created.

[0087] Step S24: Position the desktop elements displayed in the floating window container above the interface displayed on the desktop.

[0088] In some embodiments, the floating window container can be a container with the following characteristics: For interfaces displayed on the desktop, the floating window container can be located on top of each interface. The interfaces displayed on the desktop include those currently displayed on the desktop, and those opened on the desktop after the floating window container is created. The floating window container being located on top of each interface can mean that the floating window container has the characteristic of not being obscured by other interfaces on the desktop, i.e., it is located on top of these interfaces. In this way, it is possible to place desktop elements displayed in the floating window container on top of the interfaces displayed on the desktop.

[0089] In some embodiments, when multiple floating window containers exist (e.g., floating window containers are created for multiple desktop elements), the newly added floating window container can be placed above other created floating window containers in the order they were created, or multiple floating window containers can be displayed side by side (i.e., without obscuring each other).

[0090] In some embodiments of this application, desktop elements can be added to the floating window container based on the pinning command, so that the desktop elements are displayed on top of each interface. In this way, users can operate the desktop elements without closing or minimizing other display interfaces on the desktop, making user operation more convenient.

[0091] The method described in this application is further elaborated below.

[0092] In some embodiments, after desktop elements are displayed via a floating window container, the floating window container can be moved from its current location to another area of ​​the desktop in response to a window movement command, so that desktop elements can be displayed in that other area. The window movement command can be generated under any of the following circumstances:

[0093] Movement gestures targeting the floating window container are sensed on the display screen;

[0094] Based on the location of the floating window container and the location of the currently displayed interface on the desktop, determine the area where the floating window container is located in the currently displayed interface.

[0095] Please see Figure 5 and Figure 6 . Figure 5 This is a schematic diagram of a desktop including a floating window container in one state, provided as an embodiment of this application. Figure 6 for Figure 5 This is a diagram of the desktop in another state. Figure 5 and Figure 6In the diagram, the dashed box represents the currently displayed interface on the desktop, while the shadow box represents a floating window container with added desktop elements. Figure 5 The area containing the floating window container can be the current area where the floating window container is located. (This can be achieved through...) Figure 5 As can be seen, the floating window container obscures the currently displayed interface on the desktop, affecting the user's viewing experience. Therefore, the desktop element display method of this application allows users to move the floating window container to another area of ​​the desktop using gestures, such as moving it to... Figure 6 The area shown will be displayed.

[0096] In addition to the user manually moving the floating window container as described above, some embodiments may also include: if, based on the floating window container's location and the location of the currently displayed interface on the desktop, the selected floating window container is located within the area of ​​the currently displayed interface, its position can be automatically adjusted adaptively. This prevents the floating window container from obscuring the content of the currently displayed interface.

[0097] In some embodiments, after moving a desktop element from the desktop to the floating window container, the size of the floating window container can be adjusted in response to a floating window resizing command, thereby resizing the desktop element. The floating window resizing command may be generated when a gesture for resizing the floating window container is sensed on the display screen. See also... Figure 7 and Figure 8 . Figure 7 This is a schematic diagram of a desktop including a floating window container in one state, provided for another embodiment of this application. Figure 8 for Figure 7 This is a diagram of the desktop in another state. Figure 7 and Figure 8 In the diagram, a dashed box represents the currently displayed interface on the desktop, while a shaded box represents a floating window container with added desktop elements. From... Figure 7 As can be seen, the currently displayed interface occupies most of the desktop area, and the floating window container is too large, obscuring part of the currently displayed interface. In this case, users could be allowed to adjust the size of the floating window container using window resizing gestures to prevent it from obscuring the currently displayed interface.

[0098] In some embodiments, the floating window container may further include a normal display state and a minimized display state. The normal display state refers to the state where the floating window container's window is displayed on the desktop, while the minimized display state refers to the state where the floating window container remains running, but the corresponding window is not displayed on the desktop. Based on this, after moving desktop elements from the desktop to the floating window container, the floating window container can be adjusted from the normal display state to the minimized display state upon receiving a minimize command or detecting that the current interface displayed on the desktop is a preset interface. The minimize command can be generated when a minimize action is detected on the floating window container. Minimize actions include, but are not limited to, preset gesture actions and mouse actions. The preset interface can be a pre-set interface corresponding to a specified application in a specified running state. For example, the interface corresponding to PPT (PowerPoint, presentation software) when playing in full screen, or a game interface. See also... Figure 9 and Figure 10 . Figure 9 This is a schematic diagram of a desktop including a floating window container in one state, provided for another embodiment of this application. Figure 10 for Figure 9 This is a diagram of the desktop in another state. Figure 9 and Figure 10 In the diagram, a dashed box represents the default interface currently displayed on the desktop, while a shadowed box represents a floating window container with added desktop elements. Figure 9 and Figure 10 As can be seen, when the current interface displayed on the desktop is detected to be the preset interface, the floating window container can be moved from... Figure 9 The normal display status in the middle is adjusted to Figure 10 This minimizes the display state of the floating window container. This is to prevent the floating window container from interfering with or obscuring the content in the default interface.

[0099] In some embodiments, when a window restore command is detected or a preset interface stops displaying on the desktop, the floating window container can be adjusted from a minimized state to a normal display state. This allows users to view or manipulate desktop elements within the floating window container.

[0100] In some embodiments, upon receiving a command to close the floating window, the desktop elements can be removed from the floating window container, restored to the desktop, and the floating window container can be deleted. This achieves the switching of desktop elements from the floating window container to the desktop for display.

[0101] In some embodiments, when restoring desktop elements to the desktop, the desktop elements can be restored to their initial positions on the desktop. This initial position refers to the location of the desktop element on the desktop before it was switched from the desktop to the floating window container for display. This allows users to easily locate the restored desktop elements based on their initial positions after restoration.

[0102] Understandably, in some embodiments, the floating window container can be randomly restored to an empty area on the desktop. An empty area refers to a region on the desktop where there is no content. This reduces the amount of processing logic and makes the solution easier to implement.

[0103] In some embodiments, based on Figure 3 The floating window container creation process allows you to store the desktop element's desktop coordinates before moving it from the desktop to the floating window container. Then, when restoring the desktop element to the desktop, it checks if content exists in the area defined by the desktop coordinates. If not, the desktop element is restored to that area. If content exists, it is restored to an empty area on the desktop. This prevents the desktop element from overlapping with other content (such as application icons) when it's switched to the floating window container and its initial position on the desktop is occupied by other content.

[0104] In some embodiments, after restoring the desktop element to its position within the area defined by the desktop coordinates, if the size of the desktop element is different from the size of the area defined by the desktop coordinates, the size of the desktop element is adjusted to match the size of the area defined by the desktop coordinates. Specifically, for example, in... Figure 7 and Figure 8 In the scenario shown, the size of desktop elements may be adjusted while they are displayed through a floating window container. After returning to the desktop, the desktop elements may not fully fill the grid in the desktop's coordinate system. Please refer to [link to details]. Figure 4 and Figure 11 . Figure 11 This is a schematic diagram illustrating the restoration of desktop elements to the desktop according to one embodiment of this application. Figure 4 and Figure 11 It can be seen that, on the one hand, because the size of the desktop elements was adjusted within the floating window container, after the desktop elements are restored to the desktop, their size relative to the initial desktop elements on the desktop (such as...) Figure 4As shown in the image, the number of grid cells occupied is significantly reduced. The change in the size of desktop elements may lead to a poor user experience; furthermore, the right and bottom edges of desktop elements are located in the middle of the grid, not filling a full grid cell, making coordinate calculations in the desktop coordinate system inconvenient (see [link to documentation] for details). Figure 4 (Related description). Therefore, after restoring desktop elements to the desktop, adjusting their size to match the size of the area defined by desktop coordinates can improve the user experience and facilitate coordinate calculations in the desktop coordinate system.

[0105] In some embodiments of this application, desktop elements can be added to a floating window container based on a "pin to top" command, making them appear on top of other interfaces; conversely, desktop elements can be removed from the floating window container based on a "close floating window" command, allowing them to be displayed directly on the desktop. Specifically, when other display interfaces (such as a PowerPoint presentation) exist on the desktop, the floating window container can position desktop elements on top of these interfaces. This allows users to view or manipulate desktop elements without closing or minimizing other display interfaces, making user operation more convenient. When other display interfaces are closed or minimized, the desktop elements can be restored to the desktop for display, facilitating desktop element management.

[0106] Let's take a specific use case as an example to illustrate the desktop element display method of this application. Here, we assume the desktop element is used to display a desktop clock tool. When a user is presenting a PPT on the desktop, they can use the "pin to top" command to control the desktop element to be displayed on top of the PPT interface. In this way, the user can view the time displayed by the desktop clock tool without closing or minimizing the PPT interface, making operation more convenient. When the user finishes the PPT presentation, they can use the "close in floating window" command to restore the desktop element to the desktop for display, facilitating desktop element management and making the desktop more aesthetically pleasing.

[0107] Please see Figure 12 This is a schematic diagram of a module of an electronic device provided in one embodiment of this application. The electronic device is equipped with an operating system, and the desktop of the operating system includes desktop elements; the electronic device includes:

[0108] A touchscreen is used to display the desktop and receive commands to bring desktop elements to the top; and

[0109] The processor is used to create floating window containers for desktop elements according to the top-down instruction, move desktop elements from the desktop to the floating window containers, and place the desktop elements displayed in the floating window containers on top of the interface displayed on the desktop.

[0110] It should be noted that in some embodiments, in addition to performing the above operations, the processor can also perform other operation steps in the above display method, such as removing desktop elements from the floating window container and restoring desktop elements to the desktop when a floating window closing instruction is received.

[0111] Please see Figure 13 This is a schematic diagram of a module of an electronic device provided in another embodiment of this application. The electronic device is connected to a display device, and the electronic device is equipped with an operating system. The desktop of the operating system includes desktop elements, and the desktop of the operating system is displayed through the display device. The electronic device includes:

[0112] The communication module is used to communicate with the display device and receive commands from the display device to bring desktop elements to the top; and

[0113] The processor is used to generate control instructions based on the top-down instruction and send the control instructions to the display device through the communication module, so as to control the display device to create a floating window container for desktop elements, move desktop elements from the desktop to the floating window container, and place the desktop elements displayed in the floating window container on the top layer of the interface displayed on the desktop.

[0114] It should be noted that in some embodiments, in addition to performing the above operations, the processor can also perform other operation steps in the above display method. For example, when the communication module receives a floating window closing instruction sent by the display device, the processor can generate a floating window removal instruction and send the generated floating window removal instruction to the display device through the communication module, so as to control the display device to remove the desktop elements from the floating window container and restore the desktop elements to the desktop.

[0115] In practical applications, Figure 13 The electronic device shown could be, for example, a smart speaker. This smart speaker can have an operating system installed, enabling the aforementioned function of displaying desktop elements via a floating window. Typically, to simplify the hardware structure of smart speakers, they are not equipped with a display screen. When using a smart speaker, a communication connection can be established between the smart speaker and an external display device through its built-in communication module. The display device can be a touchscreen. The display device can receive user commands to "pin" desktop elements, which are then sent to the smart speaker. Subsequently, the smart speaker can display the desktop elements on top of the screen via a created floating window container based on the pinning command.

[0116] Please see Figure 14This is a schematic diagram of an electronic device provided in another embodiment of this application. The electronic device includes a processor and a memory, the memory being used to store a computer program, which, when executed by the processor, implements the above-described method for displaying desktop elements.

[0117] The processor can be a central processing unit (CPU). It can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.

[0118] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of this invention. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the methods described in the above embodiments.

[0119] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0120] One embodiment of this application also provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the above-described method for displaying desktop elements.

[0121] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for displaying desktop elements, characterized in that, The method is applied to the operating system of an electronic device, wherein the desktop of the operating system includes desktop elements, and the method includes: Receive the command to bring the desktop element to the top; Create a floating window container for the desktop element according to the pin command; Move the desktop element from the desktop to the floating window container; and The desktop elements displayed in the floating window container are positioned on top of the interface displayed on the desktop; Creating a floating window container for the desktop element includes: Determine the desktop coordinates of the desktop element, where the desktop coordinates refer to the coordinate position of the desktop element in the grid coordinate system of the desktop, which is established based on the grid matrix of the desktop, and the desktop element is displayed on the desktop with the grid as the smallest unit; convert the desktop coordinates of the desktop element to screen coordinates, where the screen coordinates refer to the coordinate position of the desktop element in the screen coordinate system of the desktop, which is established based on the screen resolution; create the floating window container in the area defined by the screen coordinates; Alternatively, determine the screen coordinates of the desktop element based on the screen coordinate system; and create the floating window container within the area defined by the screen coordinates. Alternatively, the floating window container can be created within the area defined by the desktop coordinates.

2. The method as described in claim 1, characterized in that, After creating the floating window container, the method further includes: If a command to close the floating window is received, the desktop element is removed from the floating window container and restored to the desktop.

3. The method as described in claim 2, characterized in that, Before moving the desktop element from the desktop to the floating window container, the method further includes: Store the desktop coordinates of the desktop element as the element's desktop coordinates; Restoring the desktop elements to the desktop includes: Determine if there is content in the area defined by the desktop coordinates of the element. If not, restore the desktop element to the area defined by the desktop coordinates of the element.

4. The method as described in claim 3, characterized in that, The method further includes: If the area defined by the desktop coordinates of the element contains content, the desktop element is restored to an empty area on the desktop.

5. The method as described in claim 3, characterized in that, After restoring the desktop element to the area defined by the desktop coordinates of the element, the method further includes: If the size of the desktop element is not the same as the size of the area defined by the desktop coordinates, adjust the size of the desktop element so that it matches the size of the area defined by the desktop coordinates.

6. The method as described in claim 1, characterized in that, After moving the desktop element from the desktop to the floating window container, the method further includes: In response to a floating window adjustment command, the window size of the floating window container is adjusted to adjust the size of the desktop element; and / or In response to a window move command, the floating window container is moved from its current location to another area of ​​the desktop to display the desktop elements in that other area.

7. The method as described in claim 1, characterized in that, The floating window container includes a normal display state and a minimized display state. The normal display state refers to the state in which the window of the floating window container is displayed on the desktop, and the minimized display state refers to the state in which the floating window container remains running, but the corresponding window is not displayed on the desktop. After moving the desktop element from the desktop to the floating window container, the method further includes: When a minimize command is received or when the current interface displayed on the desktop is a preset interface, the floating window container is adjusted from the normal display state to the minimized display state.

8. An electronic device, characterized in that, The electronic device is equipped with an operating system, and the desktop of the operating system includes desktop elements; the electronic device includes: A touchscreen for displaying the desktop and receiving commands to bring desktop elements to the top; and A processor is configured to create a floating window container for the desktop element according to the top instruction, move the desktop element from the desktop to the floating window container, and place the desktop element displayed in the floating window container on top of the interface displayed on the desktop. Creating a floating window container for the desktop element includes: determining the desktop coordinates of the desktop element, where the desktop coordinates refer to the coordinate position of the desktop element in the grid coordinate system of the desktop, the grid coordinate system being established based on the grid matrix of the desktop, and the desktop element being displayed on the desktop with the grid as the smallest unit; converting the desktop coordinates of the desktop element to screen coordinates, where the screen coordinates refer to the coordinate position of the desktop element in the screen coordinate system of the desktop, the screen coordinate system being established based on the screen resolution; creating the floating window container in the area defined by the screen coordinates; or, determining the screen coordinates of the desktop element based on the screen coordinate system; creating the floating window container in the area defined by the screen coordinates; or, creating the floating window container in the area defined by the desktop coordinates.

9. An electronic device, characterized in that, The electronic device is connected to a display device, and the electronic device is equipped with an operating system. The desktop of the operating system includes desktop elements, and the desktop of the operating system is displayed through the display device. The electronic device includes: A communication module is configured to communicate with the display device and receive a command from the display device to bring the desktop element to the top; and The processor is configured to generate control instructions based on the top placement instruction, and send the control instructions to the display device through the communication module, so as to control the display device to create a floating window container for the desktop element, move the desktop element from the desktop to the floating window container, and place the desktop element displayed in the floating window container on the upper layer of the interface displayed on the desktop. Creating a floating window container for the desktop element includes: determining the desktop coordinates of the desktop element, where the desktop coordinates refer to the coordinate position of the desktop element in the grid coordinate system of the desktop, the grid coordinate system being established based on the grid matrix of the desktop, and the desktop element being displayed on the desktop with the grid as the smallest unit; converting the desktop coordinates of the desktop element to screen coordinates, where the screen coordinates refer to the coordinate position of the desktop element in the screen coordinate system of the desktop, the screen coordinate system being established based on the screen resolution; creating the floating window container in the area defined by the screen coordinates; or, determining the screen coordinates of the desktop element based on the screen coordinate system; creating the floating window container in the area defined by the screen coordinates; or, creating the floating window container in the area defined by the desktop coordinates.

10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store a computer program that, when executed by the processor, implements the method as described in any one of claims 1 to 7.