A method for implementing client switching between multiple workspaces in a Wayland environment

By using Wayland linked list technology and proxy node management on the Wayland synthesizer, the client's data interaction efficiency and excessive resource usage during multi-workspace switching in Wayland environment are solved, and efficient switching operations and excellent user experience are achieved.

CN119621227BActive Publication Date: 2025-05-16KYLIN CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510158952.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-05-16
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

In the Wayland environment, clients have problems such as low data interaction efficiency and excessive resource utilization when switching between multiple workspaces, and it is difficult for the existing technology to achieve user-friendly switching operations.

Method used

Using Wayland linked list method, the client switches in multiple workspaces on the Wayland synthesizer side, and reduces the data interaction between the client and the synthesizer by creating and managing proxy nodes.

Benefits of technology

It realizes the function of client switching in multiple workspaces, reduces data interaction and resource usage, and improves operational efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621227B_ABST
    Figure CN119621227B_ABST
Patent Text Reader

Abstract

The present invention provides a method for implementing the switching of a client in multiple workspaces under a Wayland environment, belonging to the technical field of Wayland synthesizer development, and comprising the following steps: step 1): initialization, Wayland synthesizer initialization, multiple workspace initialization; step 2): creating a new client, the client joining the workspace, step 3): the client moving to the workspace; step 4): the client moving out of the workspace. The present invention uses a method based on a Wayland linked list to implement the function of switching a client in multiple workspaces on the Wayland synthesizer side, thereby reducing the data interaction between the client and the synthesizer, and saving time and resource costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for implementing switching of a client in multiple workspaces, and in particular to a method for implementing switching of a client in multiple workspaces in a Wayland environment, and belongs to the technical field of Wayland synthesizer development. Background Art

[0002] In the process of developing and improving the Wayland compositor, in order to make the Wayland compositor more convenient to use, it is necessary to support more functions that are already supported by other graphics systems; client switching between multiple workspaces is a common function of the compositor. It is necessary and desirable for the Wayland compositor to support multiple workspaces and be able to complete the client switching between multiple workspaces in accordance with user habits.

[0003] There are two main states of the client in multiple workspaces. The first is that the client only exists in a single workspace; the second is that the client exists in multiple workspaces. Therefore, there are three situations when the client switches between multiple workspaces. The first is that the client joins other workspaces; the second is that the client is removed from other workspaces; and the third is that the client moves to another workspace.

[0004] The Chinese invention patent (CN202111291536.X, a workspace switching method, computing device and storage medium) discloses the following technical content: when the cursor is detected to be in the area to which any application icon belongs in the first preset area, the corresponding window and the identification of the workspace where the window is located are displayed in each pop-up window floating frame; when an event that triggers any window floating frame is detected, the workspace is switched to a workspace with the same identification as the currently triggered window floating frame. It can be seen that after the window floating frame pops up, the workspace switching can be completed by triggering any window floating frame of the current display interface. Compared with the existing method, the workspace switching process of the present invention does not require the user to remember shortcut keys and specific operations, and the operation is simple. For the user, the switching process is simple and easy to understand, which improves the switching efficiency, thereby improving the user's office efficiency and user experience. The patent mentions the method of using the cursor and preset area to switch workspaces, and does not involve the implementation method of the client switching multiple workspaces in the Wayland environment.

[0005] The Chinese invention patent (CN202211302780.6, a workspace switching method, device and electronic device for a desktop system) discloses the following technical content: obtaining the trajectory of the mouse pointer moving in the current workspace; determining whether there is a workspace switching method corresponding to the trajectory based on the similarity between the trajectory and the preset identifier; wherein the preset identifier corresponds to the workspace switching method; if so, sending the preset identifier and the workspace switching method corresponding to the trajectory to the desktop system, so that the desktop system switches the workspace according to the workspace switching method. This application is applicable to switching workspaces. The patent mentions obtaining the mouse movement trajectory to perform workspace switching, and does not involve the implementation method of the client switching multiple workspaces in the Wayland environment.

[0006] Currently, the client switches between multiple workspaces by operating the proxy node or the client scene node mounted under the proxy node. This operation can only be perceived by the compositor. The Wayland protocol has not yet added relevant protocols to notify the client, so the client cannot perceive its current state. When there are multiple workspaces, each workspace will apply for fixed resources (occupy memory). Too many workspaces will cause excessive memory usage. The common solution is to limit the maximum number of workspaces to avoid occupying too much memory. Summary of the invention

[0007] In view of the above problems, the present invention provides a method for implementing switching of multiple workspaces by a client in a Wayland environment, so as to implement the function of switching of multiple workspaces by the client on the Wayland synthesizer side, reduce the data interaction between the client and the synthesizer, and save time and resource costs.

[0008] To achieve the above object, the technical solution of the present invention is:

[0009] A method for implementing switching of a client in multiple workspaces in a Wayland environment, wherein the operations on the client include the client joining a workspace, the client moving to a workspace, and the client moving out of a workspace, and specifically includes the following steps:

[0010] Step 1): Initialization,

[0011] Wayland synthesizer initialization, multiple workspace initialization;

[0012] Step 2): Create a new client and add the client to the workspace.

[0013] When a new client is added to the workspace, create a proxy node for the client, and then move the client scene node to the client's proxy node in the workspace;

[0014] Step 3): The client moves to the workspace,

[0015] When the operation of moving the client to a certain workspace is triggered, a proxy node of the client is created, and then the client scene node is moved to the proxy node of the client in the target workspace;

[0016] Step 4) The client moves out of the workspace.

[0017] When the client is triggered to move out of the workspace, the client scene node is moved to the client's proxy node in the target workspace, and then the client's proxy node in the original workspace is deleted.

[0018] Furthermore, when the newly created client in step 2) joins the workspace, it first queries whether there is a proxy node of the client in the target workspace. When it is found that there is a proxy node of the client in the target workspace, there is no need to create the proxy node of the client again; when it is found that there is no proxy node of the client in the target workspace, the proxy node of the client is created.

[0019] Furthermore, in step 2), when moving the client scene node, first query whether the added workspace is the currently displayed workspace. If the query finds that the added workspace is the currently displayed workspace, move the client scene node to the client's proxy node in the workspace; if the added workspace is not the currently displayed workspace, do not move the client scene node.

[0020] Furthermore, in step 3), when the operation of triggering the client to move to a certain workspace is performed, first, a query is made as to whether there is a proxy node of the client in the target workspace. If it is found that there is a proxy node of the client in the target workspace, there is no need to create the proxy node of the client again. If it is found that there is no proxy node of the client in the target workspace, a proxy node of the client is created.

[0021] Furthermore, in step 3), after moving the client scene node to the client's proxy node in the target workspace, the client's proxy nodes in other workspaces are deleted.

[0022] Furthermore, the target workspace in step 4) is a workspace of other proxy nodes where the client exists.

[0023] Furthermore, in step 4), when the client is moved out of the workspace, if the client exists in only one workspace, the operation of moving out of the workspace is exited; if the client exists in other workspaces, the scene node of the client is moved to the proxy node of the client in the other workspace, and then the proxy node of the client in the workspace is deleted.

[0024] Furthermore, the multiple workspaces refer to multiple identical workspaces, each of which has a consistent structure and is independent of each other; after the system is started, only one workspace is in a displayed state, and the other workspaces are hidden.

[0025] The beneficial effects of the method for implementing the switching of multiple workspaces by a client in a Wayland environment of the present invention are as follows:

[0026] The present invention adopts a Wayland linked list-based method to implement the function of switching between multiple workspaces of the client at the Wayland synthesizer end, thereby reducing the data interaction between the client and the synthesizer and saving time and resource costs.

[0027] The implementation method of the present invention has low module coupling, is integrated in the workspace module, does not provide additional interfaces to the outside, and has good code closure.

[0028] The implementation method of the present invention is original, creating a proxy node encapsulation agent, managing the client status through proxy node operations, and the operation behavior is inside the workspace module, does not affect other modules, and does not require the use of external resources.

[0029] The implementation effect of the present invention is obvious, various operations of the user can be reasonably completed, the effect actually required by the user is achieved, the display interface is simple and clear, and the user experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0031] Figure 1 It is a mounting relationship diagram of the workspace, proxy node and client scene node of the present invention;

[0032] Figure 2 It is a flow chart of the client joining the workspace of the present invention;

[0033] Figure 3 It is a flow chart of the client moving to the work area of ​​the present invention;

[0034] Figure 4 This is the process of the client moving out of the workspace of the present invention. DETAILED DESCRIPTION

[0035] The technical scheme in the embodiment of the present invention is described clearly and completely below in conjunction with the accompanying drawings in the embodiment of the present invention. In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.

[0036] In order to improve the function of the client switching in multiple workspaces on the Wayland synthesizer, the present invention discloses a method for implementing the client switching in multiple workspaces under the Wayland environment. The method is based on the proxy node, and creates a corresponding proxy node when the client enters the workspace. When the client changes the relevant configuration of the workspace, the corresponding switching workspace operation is completed by controlling the client scene node, such as adding to other workspaces, adding to all workspaces, moving to other workspaces, deleting from the workspace, etc.; finally, the function of the client switching in multiple workspaces on the Wayland synthesizer is realized, and the Wayland synthesizer is improved.

[0037] Among them, combined Figure 1 As shown,

[0038] Wayland: Wayland is just a protocol, just like the current X Window protocol - X11, it only defines how to communicate with the kernel and how to communicate with the Client.

[0039] Workspace: The workspace refers to the part of the user interface that is used to organize and manage application windows.

[0040] Multiple workspaces: multiple identical workspaces, each with the same structure and independent of each other; after the system is started, only one workspace is displayed, and the other workspaces are hidden.

[0041] Proxy node: a proxy node placed at the corresponding level of the workspace to redirect clients.

[0042] Client scene node: Wayland node, which contains the data sent by the client to the compositor and is mounted under the proxy node.

[0043] The present invention divides the operations on the client into three categories: 1. adding to the work area, 2. moving to the work area, and 3. moving out of the work area.

[0044] Assuming there are multiple workspaces:

[0045] Point 1, add to the workspace, you can specify the workspace to add the client proxy node, multiple calls can be added to all workspaces; see Example 1 for details;

[0046] Point 2, moving to the workspace, will add the client to the specified workspace and delete the proxy nodes of the client in all other workspaces; see Example 2 for details;

[0047] Point 3, moving out of the workspace, the proxy node in the client's current workspace can be deleted, and the client proxy node still exists in other workspaces. See Example 3 for details.

[0048] Example 1 - Create a new client in the workspace

[0049] A method for implementing client switching between multiple workspaces in a Wayland environment, combined with Figure 1 and Figure 2 As shown, the following steps are included:

[0050] Step 1): Initialization, Wayland synthesizer initialization, multiple workspace initialization;

[0051] Step 2): Create a new client and add the client to the workspace.

[0052] When a client joins a workspace, it first queries whether there is a proxy node for the client in the target workspace. If not, it is created (proxy node creation includes: creation of proxy nodes and resource application / memory usage when the client enters the workspace). Then it queries whether the joined workspace is the currently displayed workspace. If it is the currently displayed workspace, the client scene node is moved to the client's proxy node in the target workspace. If it is not the currently displayed workspace, it is not moved.

[0053] Example 2 - Moving the client to a certain workspace

[0054] A method for implementing client switching between multiple workspaces in a Wayland environment, combined with Figure 1 and Figure 3 As shown, the following steps are included:

[0055] On the basis of Example 1, the client moves to the workspace. When the operation of moving the client to a certain workspace is triggered, first query whether there is a proxy node of the client in the target workspace. If the proxy node of the client does not exist, create it, and then move the client scene node to the proxy node of the client in the target workspace. Finally, delete the proxy nodes of the client in other workspaces.

[0056] Example 3 - Moving a client out of a workspace

[0057] A method for implementing client switching between multiple workspaces in a Wayland environment, combined with Figure 1 and Figure 4 As shown, the following steps are included:

[0058] On the basis of Example 2, the client moves out of the workspace. When the operation of moving the client out of the workspace is triggered, if the client only exists in one workspace, the operation of moving out of the workspace is exited; if the client exists in other workspaces, the client scene node is moved to the proxy node of the client in the other workspace, and then the proxy node of the client in the original workspace is deleted.

[0059] Example 4 - Implementing client switching between multiple workspaces

[0060] A method for implementing client switching in multiple workspaces in a Wayland environment also involves client switching between multiple workspaces. Switching workspaces means hiding the current workspace and displaying the workspace to be switched. Switching workspaces does not operate proxy nodes. Since the display content of the client is in the scene node, if the client is to be displayed in the workspace, the client scene node needs to be mounted to the workspace. If the client exists in both the current workspace and the switched workspace (both workspaces have the client's proxy node), the client scene node needs to be operated to be mounted to the workspace to be switched.

[0061] It is worth noting that the object of switching workspaces is the workspace, and the object moved to another workspace is the client; the operation of moving the client to the workspace will delete the proxy nodes in other workspaces of the client; the proxy node is the basis for whether the client exists in the workspace. Switching workspaces can verify whether the client exists in multiple workspaces and can display it intuitively.

[0062] The present invention adopts a Wayland linked list-based method to implement the function of switching between multiple workspaces of the client at the Wayland synthesizer end, thereby reducing the data interaction between the client and the synthesizer and saving time and resource costs.

[0063] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

Claims

1. A method for implementing switching between multiple workspaces of a client in a Wayland environment, characterized in that: The method operates the client including the client joining the workspace, the client moving to the workspace, and the client moving out of the workspace, and specifically includes the following steps: Step 1): Initialization, Wayland synthesizer initialization, multiple workspace initialization; Step 2): Create a new client and add the client to the workspace. When a new client is added to the workspace, create a proxy node for the client, and then move the client scene node to the client's proxy node in the workspace; Step 3): The client moves to the workspace, When the operation of moving the client to a certain workspace is triggered, a proxy node of the client is created, and then the client scene node is moved to the proxy node of the client in the target workspace; Step 4) The client moves out of the workspace. When the client is triggered to move out of the workspace, the client scene node is moved to the client's proxy node in the target workspace, and then the client's proxy node in the original workspace is deleted.

2. According to the method for implementing the switching of multiple workspaces by a client in a Wayland environment in claim 1, it is characterized in that: When the newly created client in step 2) joins the workspace, it first queries whether there is a proxy node for the client in the target workspace. If it is found that there is a proxy node for the client in the target workspace, there is no need to create the proxy node for the client again; if it is found that there is no proxy node for the client in the target workspace, the proxy node for the client is created.

3. A method for implementing switching of multiple workspaces by a client in a Wayland environment according to claim 1 or 2, characterized in that: In step 2), when moving the client scene node, first check whether the added workspace is the currently displayed workspace. If the query finds that the added workspace is the currently displayed workspace, move the client scene node to the client's proxy node in the workspace; if the added workspace is not the currently displayed workspace, do not move the client scene node.

4. According to the method for implementing the switching of multiple workspaces by a client in a Wayland environment in claim 1, it is characterized in that: In step 3), when the operation of triggering the client to move to a certain workspace is triggered, first query whether there is a proxy node for the client in the target workspace. If it is found that there is a proxy node for the client in the target workspace, there is no need to create the proxy node for the client again; if it is found that there is no proxy node for the client in the target workspace, then create the proxy node for the client.

5. A method for implementing switching of multiple workspaces by a client in a Wayland environment according to claim 1 or 4, characterized in that: In step 3), move the client scene node to the client's proxy node in the target workspace and then delete the client's proxy nodes in other workspaces.

6. The method for implementing switching of multiple workspaces by a client in a Wayland environment according to claim 1, characterized in that: The target workspace described in step 4) is the workspace of other proxy nodes where the client exists.

7. A method for implementing switching of multiple workspaces by a client in a Wayland environment according to claim 1 or 6, characterized in that: In step 4), when the client is moved out of the workspace, if the client exists in only one workspace, the operation of moving out of the workspace is exited; if the client exists in other workspaces, the scene node of the client is moved to the proxy node of the client in the other workspace, and then the proxy node of the client in the original workspace is deleted.

8. The method for implementing switching of multiple workspaces by a client in a Wayland environment according to claim 1, characterized in that: The multiple workspaces refer to multiple identical workspaces, each of which has a consistent structure and is independent of each other; after the system is started, only one workspace is displayed, and the other workspaces are hidden.

Citation Information

Patent Citations

  • A workspace switching method, computing device, and storage medium

    CN113741758B

  • Working area switching method and device of desktop system and electronic equipment

    CN115700439A

  • Working area switching method, computing equipment and storage medium

    CN113741758A

  • Wayland synthesizer

    CN115809047A