Authorized window master screen display method, device and equipment in multi-screen mode and medium

By listening to authorization pop-up requests in Linux system, creating and managing full-screen windows to cover all screens and disabling the switch shortcut keys, the problem of insufficient priority of authorization windows in multi-screen mode is solved, ensuring timely acquisition of authorization information and normal operation of important functions.

CN120371246AActive Publication Date: 2025-07-25KYLIN CORP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510883808.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-07-25
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

In multi-screen mode, the prior art cannot effectively ensure the high priority display of the authorization window. Users may perform unauthorized operations through other screens that are not masked, affecting the timeliness of authorization and the operation of important functions.

Method used

By listening to user authorization pop-up requests for the Linux system Polkit service, create a full-screen window and set it to the top state, update the position and size of the full-screen window in real time to cover all screens, and disable the toggle shortcut keys to ensure that the full-screen window always covers all screens and displays authorization interaction information.

Benefits of technology

It realizes high priority display of authorization windows in multi-screen mode, avoids users' misoperation and switches to other windows, ensures timely acquisition of authorization information, and improves authorization efficiency and the reliability of important functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371246A_ABST
    Figure CN120371246A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an authorized window master screen display method, device, equipment and medium in a multi-screen mode, and the method comprises the steps: monitoring and responding to an authorized pop-up window request, creating a full-screen window at the top, monitoring the coordinate change of a display area where a display is inserted and pulled out, and updating the position and size of the full-screen window in real time, and creating an authorization window by taking the full-screen window as a parent window and displaying authorization interaction information, calling an interface of the window manager to disable the switching shortcut key, and closing the full-screen window after authorization is completed to recover the disabled shortcut key. The position and the size of the full-screen window are updated in real time by monitoring the inserting or pulling-out action of the display and changing according to the coordinates of the display area, so that the size of the full-screen window is always consistent with the size of the maximum window, all screens are covered, a user can only operate in the full-screen window, a switching shortcut key is shielded, and the user experience is improved. The situation that a user switches to other windows by misoperation and ignores authorization information is avoided, and the high priority of the authorization window is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of window display priorities in the Linux operating system, and particularly to a method, device, equipment, and medium for full-screen display of an authorized window in a multi-screen mode. Background Art

[0002] In the applications of the Linux operating system in all walks of life, with the diversification and intelligence of the desktop environment, the requirements for the interface interaction experience are getting higher and higher. In the desktop environment, some important pop-up windows need to be strongly reminded for priority operations. For example, when authorizing a pop-up window, it is not allowed to operate other application program interfaces, including but not limited to disabling the task bar, desktop, control panel, file manager, etc., to ensure timely authorization and guarantee the operation of important functions.

[0003] The prior art often masks by displaying a topmost and transparent full-screen window, and then displays a sub-window on the full-screen window, restricting the user to operate only within the full-screen window, which can ensure the priority of the window. However, when an authorization pop-up window is required for authorization, especially in the case of multiple screens, the user can perform activities other than the authorization operation through other unmasked screens, affecting the priority of the authorization window, and there will be a situation where authorization cannot be obtained in a timely manner, and the operation of important functions cannot be guaranteed. Summary of the Invention

[0004] Embodiments of the present invention provide a method, device, equipment, and medium for full-screen display of an authorized window in a multi-screen mode to solve the technical problem of high-priority display of an authorized window in a multi-screen mode.

[0005] In a first aspect, embodiments of the present invention provide a method for full-screen display of an authorized window in a multi-screen mode, including: S101, listening for a user authorization pop-up window request of the Linux system Polkit service; S102, in response to the user authorization pop-up window request, creating a full-screen window and setting the window to the topmost state; S103, updating the position of the full-screen window in real time according to the insertion and removal of the display, and at the same time adjusting the size of the full-screen window to the maximum window size visible in the current display mode of the system; S104, setting the full-screen window as the parent window, creating an authorized window on the parent window, and displaying authorization interaction information within the authorized window; S105, actively disabling the switching shortcut keys for switching workspaces and switching application windows; S106, when receiving the user's authorization operation, closing the full-screen window and restoring the disabled shortcut keys.

[0006] Further, the S103 includes: Obtain the maximum window size currently visible on the system, and set the size of the full-screen window to be the same as the maximum window size; Monitor and respond to the insertion or removal action of the display, and obtain the latest display area coordinates according to the insertion or removal action of the display; According to the latest display area coordinates, update the position and window size of the full-screen window in real time.

[0007] Further, the S105 includes: Call the D-Bus interface to generate a list of disabled switching shortcut keys, and add a disabled status flag to each shortcut key in the list; Register the D-Bus service, block the switching shortcut keys according to the list of disabled switching shortcut keys and the disabled status flags of each shortcut key in the list, and update the disabled status flags of the shortcut keys.

[0008] Further, the S102 includes: Receive the user authorization pop-up window request from Polkit; Create a QWidget window, and the window size is the maximum window size visible in the current display mode of the system; Set the QWidget window properties to borderless, always-on-top, and transparent.

[0009] Further, the method further includes: Determine the transparency attribute of the full-screen window according to the transparency effect support option of the window compositor, and draw the corresponding background image according to the transparency attribute and the number of screens, and the image size of the background image is the same as the size of the corresponding screen.

[0010] Further, the S104 includes: Set the full-screen window as the parent window, and create an authorization window based on QDialog on the parent window; Display authorization interaction information in the authorization window, and the authorization interaction information includes: authorization description information, authorization program icon, and authorization user list.

[0011] Further, the method further includes: Set the authorization window as a modal dialog box; Monitor the mouse click area, and trigger the jitter reminder effect of the modal dialog box according to the mouse click area.

[0012] In a second aspect, an embodiment of the present invention provides an authorization window full-screen display device in a multi-screen mode, including: A request monitoring module, configured to monitor user authorization pop-up window requests of the Linux system Polkit service; A request response module, configured to respond to a user authorization pop-up request and create a full-screen window, setting the window to be always-on-top; A window update module, configured to update the position of the full-screen window in real time according to the insertion and removal of the display and adjust the size of the full-screen window; An authorization information module, configured to set the full-screen window as the parent window and create an authorization window on the parent window to display authorization interaction information; A shortcut key blocking module, configured to actively disable the switching shortcut keys for switching workspaces and switching application windows; A window restoration module, configured to close the full-screen window and restore the disabled shortcut keys when receiving a user authorization operation.

[0013] Thirdly, an embodiment of the present invention provides an electronic device, including: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method for full-screen display of an authorization window in a multi-screen mode.

[0014] Fourthly, an embodiment of the present invention provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the above-mentioned method for full-screen display of an authorization window in a multi-screen mode when executed by a computer processor.

[0015] The method for full-screen display of an authorization window in a multi-screen mode, apparatus, device and medium provided by the embodiments of the present invention. The method creates a full-screen window according to a user authorization pop-up request, and at the same time monitors the insertion or removal action of the display. According to the change of the display area coordinates caused by the insertion or removal of the display, the position and size of the full-screen window are updated in real time, so that the size of the full-screen window always remains the same as the maximum window size visible in the current display mode, thereby achieving the effect of covering all screens, enabling the user to only operate within the full-screen window and covering other contents on the screen, ensuring the high priority of the authorization window. The switching shortcut keys are blocked through the D-Bus interface to prevent the user from accidentally switching to other windows and ignoring the authorization information. At the same time, by listening to the exit of the D-Bus service, the disabling of the shortcut keys can be lifted, avoiding the problem that the shortcut keys are unavailable due to abnormal exit of the shortcut key disabling. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings forming a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings: Figure 1Flowchart of a method for full-screen display of an authorization window in a multi-screen mode according to Embodiment 1 of the present invention; Figure 2 Flowchart of a method for full-screen display of an authorization window in a multi-screen mode according to Embodiment 2 of the present invention; Figure 3 Flowchart of a method for full-screen display of an authorization window in a multi-screen mode according to Embodiment 3 of the present invention; Figure 4 Flowchart of a method for full-screen display of an authorization window in a multi-screen mode according to Embodiment 4 of the present invention; Figure 5 Schematic structural diagram of an apparatus for full-screen display of an authorization window in a multi-screen mode according to Embodiment 5 of the present invention; Figure 6 Structural diagram of the device according to Embodiment 6 of the present invention. Detailed implementation manners

[0017] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Additionally, it should be noted that for the sake of description, only parts related to the present invention rather than all structures are shown in the accompanying drawings.

[0018] In the Linux operating system, users can continue to perform operations such as clicking, inputting, and switching interfaces with the windows of other general programs through the parts not covered by the unauthorized window, which easily causes the authorization window to be ignored, affecting the timeliness of authorization and thus delaying the use of important functions. Covering the screen with a full-screen window can prevent users from clicking on parts outside the authorization window, but in a multi-screen environment, it is often difficult for the full-screen window to cover all screens as the number of screens changes, and users can still operate through other screens, unable to ensure the high priority of the authorization window and affecting the authorization efficiency.

[0019] Embodiment 1 Figure 1 Flowchart of a method for full-screen display of an authorization window in a multi-screen mode according to Embodiment 1 of the present invention. In this embodiment, the size of the full-screen window is adjusted in real time by listening for the access and removal actions of the monitor to achieve the priority display of the authorization window, specifically including the following steps: S101, listen for the user authorization pop-up window request of the Linux system Polkit service.

[0020] First, the operating system environment needs to be configured to support the dependencies of the authorization pop-up window. It is necessary to confirm the installation of the policykit-1 framework for managing management policies and privileges, and confirm the installation of ukui-polkit for the authorization pop-up window proxy, the ukui-kwin window manager, and the ukui-settings-daemon configuration management backend. Exemplarily, when starting the user desktop environment, the following configured applications can be autostarted through the desktop file: / etc / xdg / autostart / polkit-ukui-authentication-agent-1.desktop And autostart the authorization pop-up window backend program when logging in: / usr / lib / x86_64-linux-gnu / ukui-polkit / polkit-ukui-authentication-agent-1.

[0021] The authorization pop-up window backend program listens for user authorization pop-up window requests by registering a listener for the Polkit service.

[0022] S102, in response to the user authorization pop-up window request, create a full-screen window and set the window to the topmost state.

[0023] When the authorization pop-up window backend program listens to the Polkit service and receives the user authorization pop-up window request, it responds to the user authorization pop-up window request. At this time, a full-screen window is created, and the properties of the full-screen window are set to the topmost, covering the entire screen, so that the user can only operate within the full-screen window, avoiding operating on parts outside the full-screen window.

[0024] S103, update the position of the full-screen window in real time according to the insertion and removal of the monitor, and at the same time adjust the size of the full-screen window to the maximum window size visible in the current display mode of the system.

[0025] According to the maximum window size visible in the current display mode of the system, set the size of the full-screen window to be the same as the maximum window size, so that the full-screen window can cover all screens. By listening for the insertion or removal action of the monitor, the coordinate change of the display area can be obtained. Connecting the monitor will increase the coordinate range of the display area, and removing the monitor will decrease the coordinate range of the display area. Update the position and size of the full-screen window in real time according to the coordinate range of the display area to ensure that the size of the full-screen window always remains the same as the maximum window size visible in the current display mode, so that the full-screen window always covers all screens. Exemplarily, a new rule can be added for the full-screen window in the window manager, the rule is set to not limit the window size, and the window size can be freely set within the application. Bind the newly added rule to the full-screen window in the configuration file, so that the window manager no longer restricts the size of the full-screen window, and then the above method for adjusting the size of the full-screen window takes effect, achieving the effect of covering all screens.

[0026] S104, set the full-screen window as the parent window, create an authorization window on the parent window, and display authorization interaction information in the authorization window.

[0027] The full-screen window covers all screens. The authorization window, as a child window of the full-screen window, is displayed on the upper layer of the parent window to display authorization information and present it to the user in a prominent and eye-catching manner, facilitating the user to focus on the authorization operation. The authorization window inherits from the QDialog class. When instantiating the authorization window, the parentWidget parameter is passed into the instance pointer of the full-screen window, and then information such as the purpose of authorization and the application icon that needs authorization is passed to the instance of the authorization window class through the information transfer interface. The authorization window displays the information content at an appropriate window position.

[0028] S105, actively disable the switching shortcut keys for switching workspaces and switching application windows.

[0029] The window manager responds to the shortcuts for switching workspaces and switching application windows. The window program is authorized to pass the list information of the shortcut key shielding to be disabled to the D-Bus interface of the window manager, so that the window manager no longer processes the functions of these shortcut keys, achieving the purpose of disabling the functions of switching workspaces and application windows through shortcut keys; the configuration manager also has the function of responding to the shortcut keys to enter the window switcher. The window program is authorized to register a service with the D-Bus service name agreed upon with the configuration manager and provide an interface for obtaining the list of shortcut key shielding to be disabled. After the configuration manager monitors the D-Bus service registration event that meets the service name condition, it calls the function interface of the shortcut keys to be disabled of the service to not respond to the corresponding shortcut keys, achieving the purpose of disabling the function of switching windows by entering the window switcher program through shortcut keys. Disabling the above shortcut keys is to ensure that the full-screen window and the authorized window display process cannot be switched by the user pressing the shortcut keys to other workspaces or application windows, resulting in ignoring the processing of the authorization request. This method directly processes the disabling of the functions corresponding to specific shortcut keys without caring about the correspondence between the functions and the shortcut keys; in addition, the method of listening to the D-Bus service registration and service exit signals can solve the problem that the shortcut key function is always disabled due to the abnormal exit of the calling program.

[0030] S106, when receiving the user's authorization operation, close the full-screen window and restore the disabled shortcut keys.

[0031] When the user's authorization operation is completed, the full-screen window is closed. The configuration management backend restores the shortcut keys that are automatically released from the disabled service by monitoring the exit of the registered D-Bus service, and restores the shortcut key function to complete the authorization operation.

[0032] In this embodiment, according to the user's authorization pop-up window request, a full-screen window is created, and at the same time, the insertion or removal action of the monitor is monitored. According to the change of the display area coordinates caused by the insertion or removal of the monitor, the position and size of the full-screen window are updated in real time, so that the size of the full-screen window always remains the same as the maximum window size visible in the current display mode, thereby achieving the effect of covering all screens, enabling the user to only operate within the full-screen window, covering other contents on the screen, and ensuring the high priority of the authorized window. The switching shortcut keys are blocked through the D-Bus interface to prevent the user from accidentally operating to switch to other windows and ignoring the authorization information. At the same time, the disabling of the shortcut keys can be lifted by listening to the exit of the D-Bus service, avoiding the problem that the shortcut keys are unavailable due to the abnormal exit of the shortcut key disabling.

[0033] Embodiment 2 Figure 2The flowchart of a method for full-screen display of an authorization window in a multi-screen mode according to the second embodiment of the present invention. This embodiment is optimized based on the above embodiment. In this embodiment, S103 is specifically optimized as follows: Obtain the maximum window size currently visible in the system, and set the size of the full-screen window to be the same as the maximum window size; Monitor and respond to the insertion or removal action of the display, and obtain the latest display area coordinates according to the insertion or removal action of the display; Update the position and window size of the full-screen window in real time according to the latest display area coordinates.

[0034] Correspondingly, the method for full-screen display of an authorization window in a multi-screen mode provided in this embodiment specifically includes: S201, monitor the user authorization pop-up window request of the Linux system Polkit service.

[0035] S202, respond to the user authorization pop-up window request, create a full-screen window and set the window to the topmost state.

[0036] S203, obtain the maximum window size currently visible in the system, and set the size of the full-screen window to be the same as the maximum window size.

[0037] Determine the maximum window size currently visible according to the current number of screens and display area coordinates in the system, and set the size of the full-screen window to be the same as the maximum window size to ensure that the full-screen window can always maintain the full-screen state and cover all screens in a multi-screen environment. Obtain the maximum display operation area of all screens configured according to the current display parameters through the geometry() interface of the QDesktopWidget class instance returned by the QApplication::desktop() interface, and then set it to the size of the previously obtained area through the setGeometry() of the full-screen window.

[0038] S204, monitor and respond to the insertion or removal action of the display, and obtain the latest display area coordinates according to the insertion or removal action of the display.

[0039] Monitor the insertion or removal action of the display, adjust the coordinates of the display area according to the insertion or removal action, and generate the latest display area coordinates. Monitor the resized, workAreaResized, primaryScreenChanged, and screenCountChanged signals of the QDesktopWidget class instance obtained by QApplication::desktop(). After receiving the signals, re-obtain the geometry() coordinates and size of the QDesktopWidget.

[0040] S205. Update the position and window size of the full-screen window in real time according to the latest display area coordinates.

[0041] According to the coordinates and size obtained by the geometry() interface of the QDesktopWidget above, set the full-screen window to the same coordinates and size of the QRect through setGeometry to cover the entire display area, and keep the size of the full-screen window able to cover all screens.

[0042] S206. Set the full-screen window as the parent window, create an authorization window on the parent window, and display authorization interaction information within the authorization window.

[0043] S207. Actively disable the switching shortcut keys for switching workspaces and switching application windows.

[0044] S208. When receiving the user's authorization operation, close the full-screen window and restore the disabled shortcut keys.

[0045] In this embodiment, by listening for the insertion or removal action of the monitor, the latest display area coordinates are obtained, and according to the latest display area coordinates, the position and size of the full-screen window are updated in real time. In a multi-screen scenario, even if the number of screens increases or decreases, the full-screen window can still maintain the effect of covering all screens, avoiding the user from operating other parts, and ensuring the priority of the authorization window.

[0046] Optionally, the method further includes: Determine the transparency attribute of the full-screen window according to the transparency effect support option of the window compositor, and draw a corresponding background image according to the transparency attribute and the number of screens, and the image size of the background image is consistent with the size of the corresponding screen.

[0047] Determine whether the current environment supports window composition by checking whether the value of the property compositingType of the D-Bus service interface (service: org.ukui.KWin, path: / Compositor, interface: org.freedesktop.DBus.Properties) of the window compositor is "none". If it is not "none", it means window composition is supported, and then set the full-screen window accordingly. Exemplarily, if the window compositor supports the transparency property, set the full-screen window to be transparent. If it does not support the transparency property, it is necessary to draw the background image of the corresponding screen on the full-screen window according to the number of screens of the multi-screen and the size of each screen, and keep the size of the background image consistent with the size of the corresponding screen, and display the background image of the corresponding screen on the corresponding screen through the full-screen window to achieve an effect similar to full transparency, making the coverage of the full-screen window on all screens less sensitive or even insensitive, and improving the user experience.

[0048] Embodiment 3 Figure 3 The following is a flowchart of a method for authorizing a window to occupy the full screen in a multi-screen mode according to Embodiment 3 of the present invention. This embodiment is optimized based on the above embodiment. In this embodiment, S105 is specifically optimized as follows: Call the D-Bus interface to generate a list of disabled switching shortcut keys, and add a disabled status flag bit to each shortcut key in the list; Register the D-Bus service, and according to the list of disabled switching shortcut keys and the disabled status flag bits of each shortcut key in the list, disable the switching shortcut keys and update the disabled status flag bits of the shortcut keys.

[0049] Correspondingly, the method for authorizing a window to occupy the full screen in a multi-screen mode provided by this embodiment specifically includes: S301, monitor the user authorization pop-up window request of the Linux system Polkit service.

[0050] S302, respond to the user authorization pop-up window request, create a full-screen window and set the window to the topmost state.

[0051] S303, update the position of the full-screen window in real time according to the insertion and removal of the monitor, and at the same time adjust the size of the full-screen window to the maximum visible window size in the current display mode of the system.

[0052] S304, set the full-screen window as the parent window, create an authorization window on the parent window, and display authorization interaction information in the authorization window.

[0053] S305, call the D-Bus interface to generate a list of disabled switching shortcut keys, and add a disabled status flag bit to each shortcut key in the list.

[0054] The D-Bus interface is a general interface that the window manager can use to disable shortcut keys. When obtaining the shortcut keys that need to be disabled through this interface and generating a shortcut key disable shielding list, a disabled state flag can be added for each shortcut key to record and indicate the disabled state of the shortcut key. Call the D-Bus interface of the window manager (service: org.ukui.KWin, path: / Kwin, interface: org.ukui.KWin) to set the "Switch One Desktop to the Left" and other switching shortcut shielding lists through the blockShortcut interface, and register the D-Bus service name "org.ukui.settingsDaemon.shortcut.ukui-polkit" that the configuration manager listens to, and provide the interface blockShortcuts for obtaining the shielding list of disabled shortcut keys for the configuration manager to obtain the shortcut key information that needs to be shielded. In this way, before responding to shortcut keys that are not registered with kglobalaccel, the disabled status flag can be used to determine whether to continue responding during subsequent disabling. This can not only manage the disabling process of shortcut keys registered with kglobalaccel, but also manage shortcut keys that are not registered with kglobalaccel. The window manager can disable shortcut keys through the D-Bus interface to be compatible with different display service scenarios such as xorg and x-wayland scenarios.

[0055] S306, registering a D-Bus service, shielding the switching shortcut key according to the switching shortcut key shielding list and the disabled state flag of each shortcut key in the list, and updating the disabled state flag of the shortcut key.

[0056] The configuration management backend registers the D-Bus service, and the D-Bus service obtains the switching shortcut key blocking list, and blocks all shortcut keys in the table according to the list, and updates the disabled state flag indicating the disabled state, so as to facilitate the determination of the disabled state of the shortcut keys when the shortcut keys are disabled later, and can be compatible with more display service scenarios.

[0057] S307: When receiving the user's authorization operation, close the full screen window and restore the disabled shortcut keys.

[0058] When the user completes the authorization operation, the corresponding shortcut keys are automatically unblocked by monitoring the exit of the D-Bus service, avoiding the problem of shortcut keys becoming unavailable due to abnormal exit of the shortcut key disabled caller. In addition, by configuring the general D-Bus interface of the management backend, shielding shortcut keys can be compatible with different display service scenarios such as xorg and x-wayland scenarios.

[0059] In this embodiment, the disabling of shortcut keys is achieved by calling the general interface of the window manager, and the disabling state of the shortcut keys is identified by adding a disabling state flag bit, which facilitates the management of different shortcut key disabling methods. Moreover, by listening to the services corresponding to the interface, the shortcut keys are restored, avoiding the unavailability of shortcut keys caused by abnormal exit, and can also be compatible with more display service scenarios.

[0060] An optional implementation manner of this embodiment is that the S302 includes: Receiving the user authorization pop-up window request of Polkit.

[0061] The authorization pop-up window backend program receives the request of the user authorization pop-up window by listening to the Polkit service.

[0062] Create a QWidget window, and the window size is the maximum window size visible based on the current system display mode.

[0063] Create a full-screen QWidget window, and the size of the full-screen window is the same as the maximum window size visible in the current system display mode. The full-screen window is set by the window manager, and the window manager includes levels such as DesktopLayer, BelowLayer, NormalLayer, DockLayer, AboveLayer, UnmanagedLayer from the lower level to the higher level. The window manager draws the window in ascending order of the level sequence. The level of the full-screen window is AboveLayer, which ensures that the full-screen window is displayed above the desktop, task bar, and general windows, and at the same time does not affect the display levels of windows with higher-priority functions such as system notification windows and lock screen windows, ensuring that windows with higher priority can still be displayed above this full-screen window.

[0064] Set the QWidget window properties to borderless, always on top, and transparent.

[0065] By setting the full-screen window to be borderless and transparent, so that the window directly covers the task bar instead of hiding the task bar, some dynamic information of the task bar can be displayed while the authorization pop-up window is always on top, such as application message reminders in the tray, display of the date and time, etc., to prevent users from missing other reminders they want to pay attention to.

[0066] Exemplarily, by: setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint); Among them, Qt::Tool is used to set the window as a tool window (Tool Window), and a tool window usually does not have a task bar entry; Qt::WindowStaysOnTopHint is used to force the window to always be displayed on top of other windows, and the window will be placed above all other non-top-level windows (unless other windows also set this flag); Qt::FramelessWindowHint: is used to remove the border and title bar of the window, and the window has no title bar, border, close / minimize buttons and other system decorations; the transparency of the window is adjusted to 0.25 through setWindowOpacity(0.25); 0 is fully transparent, and 1 is opaque.

[0067] Embodiment 4 Figure 4 This is a flowchart of a method for full-screen display of an authorization window in a multi-screen mode according to Embodiment 4 of the present invention. This embodiment is optimized based on the above embodiment. In this embodiment, S104 is specifically optimized as: Set the full-screen window as the parent window, and create an authorization window based on QDialog on the parent window; Display authorization interaction information in the authorization window, and the authorization interaction information includes: authorization description information, authorization program icon, and authorization user list.

[0068] Correspondingly, the method for full-screen display of an authorization window in a multi-screen mode provided in this embodiment specifically includes: S401, monitor the user authorization pop-up window request of the Linux system Polkit service.

[0069] S402, respond to the user authorization pop-up window request, create a full-screen window and set the window to the topmost state.

[0070] S403, update the position of the full-screen window in real time according to the insertion and removal of the display, and at the same time adjust the size of the full-screen window to the maximum window size visible in the current display mode of the system.

[0071] S404, set the full-screen window as the parent window, and create an authorization window based on QDialog on the parent window.

[0072] After the full-screen window covers all screens, create a QDialog window in the upper layer of the full-screen window in the form of a child window for displaying authorization information, which is convenient for inheriting the attributes of the full-screen window and displaying the authorization information with a high priority.

[0073] S405, display authorization interaction information in the authorization window, and the authorization interaction information includes: authorization description information, authorization program icon, and authorization user list.

[0074] To facilitate the user in obtaining the information that requires authorization and determining whether to authorize based on the authorization information, the authorization interaction information displayed in the authorization window needs to describe the authorization content, the program icon that requires authorization, and the list of users to whom permissions are granted. Through the above authorization interaction information, the user can intuitively understand the authorization content and quickly perform the authorization operation.

[0075] S406, actively disable the switching shortcut keys for switching workspaces and switching application windows.

[0076] S407, when receiving the user's authorization operation, close the full-screen window and restore the disabled shortcut keys.

[0077] In this embodiment, by using the full-screen window as the parent window and creating an authorization window on top of the full-screen window in the form of a child window, it is convenient for property inheritance, improves the display priority of the authorization information, facilitates the user in obtaining the authorization information, and improves the user authorization efficiency.

[0078] Specifically, the method further includes: Set the authorization window as a modal dialog box.

[0079] Since the authorization window is a child window of the full-screen window, and the full-screen window covers all screens, the authorization window only occupies a part of the full-screen window. When the user clicks on the full-screen window outside the authorization window, although the full-screen window can block other applications by covering, it is still necessary to prompt the user to quickly operate the authorization.

[0080] Monitor the mouse click area, and trigger the jitter reminder effect of the modal dialog box according to the mouse click area.

[0081] By monitoring the mouse click area, when the mouse clicks on the area outside the authorization window, the jitter effect of the modal dialog box will be triggered. The jitter effect can prompt the user to pay attention to the content in the authorization window and improve the authorization efficiency.

[0082] Embodiment Five Figure 5 This is a schematic structural diagram of a device for full-screen display of an authorization window in a multi-screen mode according to Embodiment Five of the present invention. In this embodiment, the device for full-screen display of an authorization window in a multi-screen mode includes: A request monitoring module 810, configured to monitor the user authorization pop-up window request of the Linux system Polkit service; A request response module 820, configured to respond to the user authorization pop-up window request and create a full-screen window and set the window to the top state; A window update module 830, configured to update the position of the full-screen window in real time according to the insertion and removal of the display and adjust the size of the full-screen window; An authorization information module 840 is used to set the full-screen window as the parent window and create an authorization window on the parent window to display authorization interaction information; A shortcut key shielding module 850 is used to actively disable the switching shortcut keys for switching workspaces and switching application windows; A window restoration module 860 is used to close the full-screen window and restore the disabled shortcut keys when receiving the user's authorization operation.

[0083] In this embodiment, the user authorization pop-up window request is monitored by the request monitoring module, the monitored user authorization pop-up window request is responded to by the request response module, the size of the full-screen window is adjusted by the window update module, an authorization window is created by the authorization information module and the authorization interaction information is displayed in the authorization window, the switching shortcut keys are disabled by the shortcut key shielding module, and the disabled shortcut keys are restored by the window restoration module after the full-screen window is closed. By creating a full-screen window according to the user's authorization pop-up window request, and simultaneously monitoring the insertion or removal action of the display, and according to the change of the display area coordinates caused by the insertion or removal of the display, the position and size of the full-screen window are updated in real time, so that the size of the full-screen window always remains the same as the maximum window size visible in the current display mode, thereby achieving the effect of covering all screens, enabling the user to only operate within the full-screen window, covering other contents on the screen, and ensuring the high priority of the authorization window. The switching shortcut keys are shielded through the D-Bus interface to prevent the user from accidentally operating to switch to other windows and ignoring the authorization information. At the same time, by monitoring the exit of the D-Bus service, the disabling of the shortcut keys can be lifted, avoiding the problem of the shortcut keys being unavailable caused by the abnormal exit of the shortcut key disabling.

[0084] The multi-screen mode authorization window full-screen display device provided by the embodiment of the present invention can execute the multi-screen mode authorization window full-screen display method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0085] Embodiment Six Figure 6 It is a structural diagram of an electronic device according to Embodiment Six of the present invention, Figure 6 showing a block diagram of an exemplary device 12 suitable for implementing the embodiment of the present invention. Figure 6 The displayed device 12 is only an example and should not bring any limitation to the functions and usage scope of the embodiment of the present invention.

[0086] As Figure 6 shown, the device 12 is presented in the form of a general-purpose computing device. The components of the device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0087] Bus 18 represents one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, an Accelerated Graphics Port, a processor bus, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0088] Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including both volatile and nonvolatile media, removable and non-removable media.

[0089] System memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Device 12 may further include other removable / non-removable, volatile / nonvolatile computer system storage media. By way of example only, storage system 34 can be used for reading from and writing to non-removable, nonvolatile magnetic media ( Figure 6 not shown and typically called a "hard disk drive"). Although Figure 6 not shown in the figures, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from and writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) can be provided. In these instances, each drive can be connected to bus 18 by one or more data media interfaces. System memory 28 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the present invention.

[0090] A program / utility 40 having a set (at least one) of program modules 42 can be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. The program modules 42 typically carry out the functions and / or methods of the embodiments described herein.

[0091] Device 12 can also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, etc.), and can also communicate with one or more devices that enable a user to interact with the device 12 / server / computer, and / or communicate with any device that enables the device 12 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through an input / output (I / O) interface 22. Moreover, device 12 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of device 12 through a bus 18. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0092] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the method for full-screen display of an authorization window in a multi-screen mode provided by the embodiments of the present invention.

[0093] Embodiment Seven Embodiment Seven of the present invention also provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the method for full-screen display of an authorization window in a multi-screen mode as provided in the above embodiments when executed by a computer processor.

[0094] The computer storage medium of the embodiments of the present invention can adopt any combination of one or more computer-readable media. The computer-readable media can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.

[0095] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.

[0096] The program code contained on a computer-readable medium can be transmitted with any appropriate medium, including - but not limited to - wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0097] The computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages - such as Java, Smalltalk, C++, and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or, alternatively, can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).

[0098] Note that the above is only the preferred embodiment of the present invention and the applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for full-screen display of an authorization window in a multi-screen mode, characterized in that, Including: S101, monitoring the user authorization pop-up window request of the Linux system Polkit service; S102, in response to the user authorization pop-up window request, creating a full-screen window and setting the window to the topmost state; S103, updating the position of the full-screen window in real time according to the insertion and removal of the monitor, and at the same time adjusting the size of the full-screen window to the maximum window size visible in the current display mode of the system; S104, setting the full-screen window as the parent window, creating an authorization window on the parent window, and displaying authorization interaction information in the authorization window; S105, actively disabling the switching shortcut keys for switching workspaces and switching application windows; S106, when receiving the user's authorization operation, closing the full-screen window and restoring the disabled shortcut keys.

2. The method according to claim 1, wherein The S103 includes: Obtaining the maximum window size visible in the system currently, and setting the size of the full-screen window to be consistent with the maximum window size; Monitoring and responding to the insertion or removal action of the monitor, and obtaining the latest display area coordinates according to the insertion or removal action of the monitor; According to the latest display area coordinates, updating the position and window size of the full-screen window in real time.

3. The method according to claim 1, characterized in that, The S105 includes: Invoking the D-Bus interface, generating a switching shortcut key shielding list, and adding a disabled status flag bit to each shortcut key in the list; Registering the D-Bus service, shielding the switching shortcut keys according to the switching shortcut key shielding list and the disabled status flag bits of each shortcut key in the list, and updating the disabled status flag bits of the shortcut keys.

4. The method according to claim 1, wherein The S102 includes: Receiving the user authorization pop-up window request of Polkit; Creating a QWidget window, and the window size is the maximum window size visible in the current display mode of the system; Setting the QWidget window properties to borderless, topmost, and transparent.

5. The method according to claim 2, wherein The method further includes: Determining the transparency attribute of the full-screen window according to the transparency effect support option of the window compositor, and drawing the corresponding background image according to the transparency attribute and the number of screens, and the image size of the background image is consistent with the corresponding screen size.

6. The method according to claim 1, wherein The S104 includes: Setting the full-screen window as the parent window, and creating an authorization window on the parent window based on QDialog; Displaying authorization interaction information in the authorization window, and the authorization interaction information includes: authorization description information, authorization program icon, authorization user list.

7. The method according to claim 6, characterized in that, The method further includes: Setting the authorization window as a modal dialog box; Monitoring the mouse click area, and triggering the jitter reminder effect of the modal dialog box according to the mouse click area.

8. An authorization window full-screen display device in a multi-screen mode, characterized in that, Including: A request monitoring module, used for monitoring the user authorization pop-up window request of the Linux system Polkit service; A request response module, used for responding to the user authorization pop-up window request, and creating a full-screen window and setting the window to the topmost state; A window update module, used for updating the position of the full-screen window in real time according to the insertion and removal of the monitor and adjusting the size of the full-screen window; An authorization information module, used for setting the full-screen window as the parent window and creating an authorization window on the parent window to display authorization interaction information; A shortcut key shielding module, used for actively disabling the switching shortcut keys for switching workspaces and switching application windows; A window restoration module, configured to close the full-screen window and restore the disabled shortcut keys when receiving an authorization operation from a user.

9. An electronic device, characterized in that, The device includes: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for full-screen display of an authorized window in a multi-screen mode as described in any one of claims 1-7.

10. A storage medium containing computer-executable instructions, which are used to execute the method for full-screen display of an authorized window in a multi-screen mode as described in any one of claims 1-7 when executed by a computer processor.

Citation Information

Patent Citations

  • Modals in dual display communication device

    CN103430132A

  • Popup window processing method and device, equipment and storage medium

    CN112099885A

  • Multi-screen interaction method and device

    CN115454233A

  • Modal box dragging method and system compatible with multiple react component libraries

    CN118069120A

  • Method and system for limiting user to only operate current program window in desktop system

    CN118467090A