Taskbar dynamic hiding method, control device and storage medium thereof
By monitoring the application window status through a daemon process and dynamically adjusting the taskbar display strategy, the problem of the taskbar being obscured in full-screen applications is solved, achieving an intelligent and adaptive user experience and improving system compatibility and usability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KYLIN CORP
- Filing Date
- 2026-07-03
- Publication Date
- 2026-07-31
AI Technical Summary
The existing automatic taskbar hiding function is not compatible with non-standard or custom full-screen applications, which may cause it to pop up unexpectedly and obscure key information in full-screen scenarios, interrupting the user's professional task flow.
By building a daemon process to periodically monitor the application window status, and combining preset rules and geometric judgments, the taskbar display strategy is dynamically adjusted to achieve automatic switching between completely hidden and pixel bar trigger mode, thus avoiding the taskbar from popping up unexpectedly in full-screen applications.
In full-screen scenarios, the triggerable area of the taskbar is completely eliminated, ensuring the continuity and accuracy of user operations and improving system usability and compatibility in professional scenarios.
Smart Images

Figure CN122488977A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of human-computer interaction technology, specifically providing a method for dynamically hiding a taskbar, its control device, and storage medium. Background Technology
[0002] In existing Linux desktop environments (such as UKUI, GNOME, KDE, etc.), an "auto-hide" function for the taskbar is commonly provided to balance screen space utilization and taskbar accessibility. Current technologies for implementing this function mainly involve two components: the user configuration interface and the taskbar process. The user configuration interface receives user commands to enable the "auto-hide" function, while the taskbar process adjusts its display state according to the user configuration. The taskbar process listens for changes in this configuration. When it detects that "auto-hide" is enabled, the taskbar process executes the following logic: it hides the main body of the taskbar window outside the visible screen area, but retains a narrow trigger area (hotspot) with a width of 4 pixels at the edge of the screen. When the system detects that the user's mouse pointer has moved to this trigger area, the taskbar process slides the main body of the taskbar window onto the screen for user interaction. When the mouse pointer leaves the taskbar area, the main body of the taskbar window is hidden again, leaving only the pixel trigger bar.
[0003] However, this approach lacks compatibility with non-standard full-screen applications, leading to unexpected interference. Some professional or user-developed applications (such as certain map navigation software, scientific visualization software, and customized full-screen information display systems) may not strictly adhere to desktop full-screen specifications when implementing full-screen mode. If the pixel trigger bar is always present, it may pop up as a taskbar when the user accidentally moves the mouse over the screen edge in these specific application full-screen scenarios. This sudden pop-up can severely obscure critical information (such as map coordinates and data curves), interrupting the user's focused workflow. This is a long-standing and unresolved pain point and technical flaw in specific professional fields. Summary of the Invention
[0004] To overcome the above-mentioned defects, this invention is proposed to provide a solution to the technical problem that the existing taskbar auto-hide function is not compatible with non-standard or custom full-screen applications, and is prone to unexpected pop-ups, obscuring key content, and interrupting the user's professional task flow in these specific key scenarios.
[0005] In a first aspect, the present invention proposes a method for dynamically hiding the taskbar, comprising the following steps: S1: Build and start a daemon process. The daemon process establishes a connection with the X Server and registers a listener for the PropertyNotify event through the XSelectInput function. The daemon process starts a timer at a preset time interval to continuously monitor the window state of the application. S2: Based on preset rules, determine whether there is a window that is in full-screen or maximized state; S3: Based on the judgment result of step S2, dynamically adjust the display strategy of the taskbar; Step S2 includes step S21: check whether a window change event has been received. If so, parse the _NET_WM_STATE attribute of the corresponding window and determine whether it contains a full-screen flag or both a vertical maximize flag and a horizontal maximize flag.
[0006] Furthermore, the window change event is a PropertyNotify event from the X Server. If this event is received, the process calls the XGetWindowProperty function to obtain the _NET_WM_STATE property value corresponding to the window that triggered this event.
[0007] Furthermore, step S2 also includes step S22: if no window change event is received within the preset time interval of the timer, obtain the size of the root window of the screen, traverse all top-level windows and obtain their geometric dimensions, compare the geometric dimensions of all top-level windows with the size of the root window of the screen, and determine whether there is a window that matches perfectly.
[0008] Furthermore, for each window, the process obtains its position and size information by calling the XGetGeometry function.
[0009] Furthermore, if either step S21 or S22 results in "yes", it will be determined that there is a window in full-screen or maximized state.
[0010] Furthermore, step S3 includes, When a window is detected to be in full-screen or maximized mode, the daemon switches the taskbar to a completely hidden mode. When no window is detected to be in full-screen or maximized mode, the daemon switches the taskbar to a pixel-triggered mode.
[0011] Furthermore, the dynamic adjustment of the taskbar display strategy is achieved by the daemon process calling a command-line tool to modify the configuration key value corresponding to the taskbar process. The configuration key value is specifically a parameter used to control the size of the taskbar hiding trigger area.
[0012] Furthermore, the fully hidden mode refers to setting the size of the triggerable area of the taskbar to 0 pixels, and the pixel bar trigger mode refers to setting the size of the triggerable area of the taskbar to a preset value.
[0013] Secondly, the present invention provides a control device comprising a processor and a storage device, the storage device being adapted to store a plurality of program codes, the program codes being adapted to be loaded and run by the processor to execute the taskbar dynamic hiding method described in any of the above-mentioned technical solutions.
[0014] Thirdly, the present invention provides a computer-readable storage medium storing a plurality of program codes, the program codes being adapted to be loaded and run by a processor to perform the taskbar dynamic hiding method described in any of the above-described technical solutions.
[0015] The working principle and beneficial effects of this invention: In implementing the technical solution of this invention, the periodic active polling mechanism of the daemon process can robustly perceive the full-screen or maximized context without relying on whether the application follows the standard full-screen protocol. On this basis, the taskbar strategy is automatically switched according to the window state, which can effectively avoid the taskbar from accidentally popping up and obscuring the content and interrupting the operation flow in full-screen scenarios that require focused operation, while restoring convenient operation in non-full-screen scenarios. This achieves an adaptive intelligent human-computer interaction experience without user intervention, which significantly improves the system's usability and compatibility in professional scenarios. Attached Figure Description
[0016] The disclosure of this invention will become more readily understood with reference to the accompanying drawings. It will be readily understood by those skilled in the art that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Furthermore, similar numbers in the drawings are used to denote similar components, wherein: Figure 1 This is a schematic diagram of the main steps of a method for dynamically hiding the taskbar according to the present invention. Detailed Implementation
[0017] Some embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0018] Example 1 Figure 1 This is a schematic diagram illustrating the main steps of a method for dynamically hiding the taskbar according to the present invention. Figure 1 As shown, a method for dynamically hiding the taskbar in this embodiment mainly includes the following steps S1-S3.
[0019] Step S1: Build and start a daemon process, which is used to cyclically monitor the window state of applications in the graphical operating system at preset time intervals.
[0020] In one implementation, the daemon process runs automatically after system startup. The daemon process establishes a connection with the X Server and registers to listen for the PropertyNotify event via the XSelectInput function. A timer is started within the daemon process at a preset time interval; in this embodiment, it is set to 1 second. Using the preset timer, the daemon process enters its main loop, waiting for the event to occur.
[0021] Step S2: Based on preset rules, determine whether there is a window that is in full-screen or maximized state.
[0022] S21: Check if a window change event has been received. If so, parse the _NET_WM_STATE attribute of the corresponding window and determine whether it contains a fullscreen flag or both a vertical maximize flag and a horizontal maximize flag.
[0023] In this embodiment, the window change event is the PropertyNotify event from the X Server. If the event is received, the process calls the XGetWindowProperty function to obtain the _NET_WM_STATE property value corresponding to the window that triggered the event. By parsing the property value, it is determined whether the window contains the _NET_WM_STATE_FULLSCREEN (fullscreen) flag, or whether it contains both the _NET_WM_STATE_MAXIMIZED_VERT (vertical maximize) and _NET_WM_STATE_MAXIMIZED_HORZ (horizontal maximize) flags.
[0024] Furthermore, when a user launches certain applications (such as a custom map) and enters full-screen mode, the application may not have correctly set the _NET_WM_STATE_FULLSCREEN property. Therefore, the daemon process may fail to capture events, and if no window change event is received within the timer's preset interval, step S22 will be executed to trigger the auxiliary path determination.
[0025] S22: If no window change event is received within the preset time interval of the timer, obtain the size of the root window of the screen, traverse all top-level windows and obtain their geometric dimensions, compare the geometric dimensions of all top-level windows with the size of the root window of the screen, and determine whether there is a window that matches perfectly. In this embodiment, the daemon process obtains the size of the root window and traverses all top-level windows. For each window, the process obtains its position and size information by calling the XGetGeometry function. If the geometry of a top-level application window is found to perfectly match that of the root window, it is still determined to be in full-screen mode under this path, even though it lacks standard full-screen attributes (i.e., parameters extracted from the _NET_WM_STATE attribute value).
[0026] If either of the two paths in steps S21 and S22 is "yes", it will be determined that there is a window in full-screen or maximized state.
[0027] Step S3: Based on the judgment result of step S2, dynamically adjust the display strategy of the taskbar.
[0028] When a window is detected to be in full-screen or maximized mode, the daemon executes the "completely hide" command, automatically switching the taskbar to completely hidden mode. When no window is detected to be in full-screen or maximized mode, the daemon automatically switches the taskbar to pixel bar trigger mode.
[0029] In one implementation, the fully hidden mode refers to setting the size of the triggerable area of the taskbar to 0 pixels, and the pixel bar trigger mode refers to setting the size of the triggerable area of the taskbar to a preset value (such as 4 pixels).
[0030] The dynamic adjustment strategy for the taskbar display is achieved by the daemon process calling a command-line tool to modify the configuration key value corresponding to the taskbar process. Specifically, the configuration key value is a parameter used to control the size of the taskbar hiding trigger area.
[0031] For example, when the daemon switches the taskbar to fully hidden mode, it modifies a specific configuration key value for the taskbar: `gsettings set org.ukui.panel.settings hide-size 0`. In this case, regardless of mouse movement while operating the map, the taskbar will never accidentally pop up, completely avoiding obscuring fine coordinates or contour lines on the map and ensuring the continuity and accuracy of professional work. When the daemon switches the taskbar to pixel-triggered mode, it modifies a specific configuration key value for the taskbar: `gsettings set org.ukui.panel.settings hide-size 4`. In this case, the trigger area is restored to a width of 4 pixels. When browsing technical documents in a multitasking environment, users can easily move the mouse to the bottom of the screen to bring up the taskbar and switch between operations.
[0032] Based on steps S1-S3 above, an intelligent daemon process independent of the taskbar process is constructed. This daemon process uses a dual-path monitoring mechanism to detect the full-screen or maximized state of application windows in the system in real time. Based on the detection results, it drives the taskbar to automatically switch between "completely hidden mode" (trigger area of 0 pixels) and "pixel bar trigger mode" by dynamically modifying taskbar configuration parameters. This solution forms an automated closed loop of "monitoring-judgment-execution," achieving intelligent adaptation to the user's current working context with minimal system overhead.
[0033] The technical effects of this invention are as follows: By setting the trigger area size to 0, the triggerable area of the taskbar in any full-screen application is physically eliminated, thus eradicating the possibility of accidental pop-ups, especially solving the pain points in non-standard full-screen applications.
[0034] The main decision path ensures accurate identification of standard applications, while the auxiliary geometric decision path can effectively capture full-screen applications that do not strictly follow the EWMH specification (such as professional software and self-developed applications). The combination of the two ensures effectiveness in various complex scenarios, which fills the gap in existing technology.
[0035] The system makes decisions on behalf of the user, automatically enabling and completely hiding the operation in full-screen scenarios that require absolute focus, and automatically restoring convenient operation in multi-tasking scenarios, thus achieving an intelligent and adaptive user experience.
[0036] It should be noted that although the steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effects of the present invention, different steps do not necessarily have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders, and these variations are all within the scope of protection of the present invention.
[0037] Example 2 The present invention also provides a control device. In one embodiment of the control device according to the present invention, the control device includes a processor and a storage device. The storage device can be configured to store a program for executing a taskbar dynamic hiding method according to the above-described method embodiments. The processor can be configured to execute the program in the storage device, which includes, but is not limited to, a program for executing a taskbar dynamic hiding method according to the above-described method embodiments. For ease of explanation, only the parts related to the embodiments of the present invention are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. The control device can be a control device device comprising various electronic devices.
[0038] Example 3 The present invention also provides a computer-readable storage medium. In one embodiment of the computer-readable storage medium according to the present invention, the computer-readable storage medium can be configured to store a program that performs a taskbar dynamic hiding method according to the above-described method embodiments. This program can be loaded and run by a processor to implement the above-described taskbar dynamic hiding method. For ease of explanation, only the parts related to the embodiments of the present invention are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. The computer-readable storage medium can be a storage device comprising various electronic devices. Optionally, in the embodiments of the present invention, the computer-readable storage medium is a non-transitory computer-readable storage medium.
[0039] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A method for dynamically hiding the taskbar, characterized in that, Includes the following steps: S1: Build and start a daemon process. The daemon process establishes a connection with the X Server and registers a listener for the PropertyNotify event through the XSelectInput function. The daemon process starts a timer at a preset time interval to continuously monitor the window state of the application. S2: Based on preset rules, determine whether there is a window that is in full-screen or maximized state; S3: Based on the judgment result of step S2, dynamically adjust the display strategy of the taskbar; Step S2 includes step S21: check whether a window change event has been received. If so, parse the _NET_WM_STATE attribute of the corresponding window and determine whether it contains a full-screen flag or both a vertical maximize flag and a horizontal maximize flag.
2. The method for dynamically hiding the taskbar according to claim 1, characterized in that, The window change event is a PropertyNotify event from the X Server. If this event is received, the process calls the XGetWindowProperty function to obtain the _NET_WM_STATE property value corresponding to the window that triggered the event.
3. The method for dynamically hiding the taskbar according to claim 1, characterized in that, Step S2 further includes step S22: if no window change event is received within the preset time interval of the timer, obtain the size of the root window of the screen, traverse all top-level windows and obtain their geometric dimensions, compare the geometric dimensions of all top-level windows with the size of the root window of the screen, and determine whether there is a window that matches perfectly.
4. A method for dynamically hiding the taskbar according to claim 3, characterized in that, For each window, the process obtains its position and size information by calling the XGetGeometry function.
5. A method for dynamically hiding the taskbar according to claim 3, characterized in that, When either step S21 or S22 results in "yes", it will be determined that there is a window in full-screen or maximized state.
6. A method for dynamically hiding the taskbar according to claim 1, characterized in that, Step S3 includes: When a window is detected to be in full-screen or maximized mode, the daemon switches the taskbar to a completely hidden mode. When no window is detected to be in full-screen or maximized mode, the daemon switches the taskbar to a pixel-triggered mode.
7. A method for dynamically hiding the taskbar according to claim 6, characterized in that, The dynamic adjustment strategy for the taskbar display is achieved by the daemon process calling a command-line tool to modify the configuration key value corresponding to the taskbar process. Specifically, the configuration key value is a parameter used to control the size of the taskbar hiding trigger area.
8. A method for dynamically hiding the taskbar according to claim 6, characterized in that, The fully hidden mode refers to setting the size of the triggerable area of the taskbar to 0 pixels, while the pixel bar trigger mode refers to setting the size of the triggerable area of the taskbar to a preset value.
9. A control device, comprising a processor and a storage device, said storage device being adapted to store a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by the processor to perform a method for dynamically hiding the taskbar according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by a processor to perform a method for dynamically hiding a taskbar according to any one of claims 1 to 8.