Display method and electronic equipment
By grouping and adjusting the brightness of the windows in the display interface of the laptop, the problem of burning the OLED screen after long-term use is solved, and the effect of reducing power consumption and improving user experience is achieved.
Patent Information
- Application Number
- CN202411855426.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-01-14
AI Technical Summary
OLED screens are prone to burning after long-term use, resulting in color difference problems, which are difficult to effectively solve in the existing technology.
By detecting the window changes of the electronic device, the windows in the display interface are grouped. The windows in the same window group have overlapping relationships. At least one window in each window group is displayed according to high brightness, and other display areas are displayed according to low brightness. Reduce screen power consumption and reduce the risk of burning screens.
While ensuring that users view windows normally, they can reduce the brightness of other display areas, reduce screen power consumption, slow down the screen burning phenomenon of OLED screens, and improve user experience.
Smart Images

Figure CN119311240A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular to a display method and an electronic device. Background Art
[0002] With the rapid development of laptops, it has become common for people to use laptops for entertainment or work.
[0003] In order to provide users with better display effects, many laptops currently choose to configure the screen as an organic light-emitting diode (OLED) screen. However, OLED screens may burn in after long-term use, resulting in color difference problems. Summary of the invention
[0004] The present application provides a display method and an electronic device, which can reduce the screen burn-in phenomenon after long-term use of the screen.
[0005] In order to achieve the above purpose, this application adopts the following technical solutions: In a first aspect, a display method is provided, which can be applied to an electronic device, and the method may include: detecting a change in a window of the electronic device; grouping the windows displayed in the display interface of the electronic device to obtain at least one window group, and the windows in the same window group have an overlapping relationship; displaying at least one window in each of the window groups at a first brightness, and displaying other display areas of the display interface at a second brightness, wherein the first brightness is greater than the second brightness.
[0006] It is understandable that when the windows in the display interface change, the electronic device can group the windows displayed in the display interface to obtain at least one window group, and the windows in the same window group have an overlapping relationship. Thus, at least one window in each window group can be displayed at a first brightness, and other display areas other than the windows displayed at the first brightness in the display interface can be displayed at a second brightness, wherein the first brightness is greater than the second brightness. Thus, when displaying multiple windows, the electronic device can display some windows at normal brightness based on each window group for user viewing, and display other display areas other than the windows displayed at normal brightness at low brightness. While ensuring that the user can view some windows normally, the display brightness of other display areas can be reduced, and then the screen power consumption can be reduced by displaying some display areas at low brightness, and for OLED screens, the burn-in phenomenon of OLED screens used in electronic devices during long-term use can be slowed down.
[0007] In a possible implementation, displaying at least one window in each of the window groups at a first brightness, and displaying other display areas of the display interface at a second brightness, includes: displaying the topmost window in each of the window groups at the first brightness, and displaying other display areas in the display interface at the second brightness.
[0008] In this way, windows that do not block each other in the display interface of the electronic device can be displayed relatively brightly at the same time, which is convenient for users to perform multi-tasking based on these windows, and convenient for users to operate and switch between multiple windows, thereby improving the convenience of users' multi-tasking. At the same time, based on the relatively low brightness display of other display areas, the screen power consumption can be reduced, and the risk of screen burn-in can be reduced for OLED screens. It can also avoid unnecessary visual interference of other display areas to the user's multi-tasking, and keep the user's attention on the main windows that do not block each other.
[0009] In another possible implementation, when the at least one window group includes a first window group, and the topmost window in the first window group has a corresponding parent window or an owner window, displaying at least one window in each of the window groups according to a first brightness and displaying other display areas of the display interface according to a second brightness also includes: displaying the parent window or the owner window corresponding to the topmost window in the first window group according to the first brightness.
[0010] Generally, for windows with parent windows or owner windows, users may pay more attention to the contents in the upper-level windows (i.e., parent windows or owner windows) of these windows. Therefore, by displaying the main windows that do not block each other and the corresponding parent windows or owner windows with relatively high brightness, the windows that users need to pay attention to can be better highlighted, while the brightness of other display areas can be reduced. In this way, the screen power consumption and the risk of screen burn-in can be reduced by reducing the brightness of some areas, while the user experience can be improved.
[0011] In another possible implementation, when the at least one window group includes a first window group and the topmost window in the first window group has a window of the same process, displaying at least one window in each of the window groups at a first brightness and displaying other display areas of the display interface at a second brightness also includes: displaying all windows under the process where the topmost window in the first window group is located at the first brightness.
[0012] In this way, it is possible to avoid the situation where, when the same process includes multiple windows, only windows with extremely small areas in the window group (windows that are almost invisible to the user) are displayed with relatively high brightness based on the top window of the window group, while windows that require more user attention are not displayed with relatively high brightness, thereby improving the user experience.
[0013] In another possible implementation, displaying at least one window in each of the window groups at a first brightness and displaying other display areas of the display interface at a second brightness includes: displaying the topmost window in each of the window groups except the top window and all top windows displayed in the display interface at the first brightness, and displaying other display areas of the display interface at the second brightness.
[0014] In this way, the top window can always maintain a relatively high brightness display, ensuring that the top window meets the user's expectation of always keeping attention, thereby improving the user experience.
[0015] In another possible implementation, the grouping of windows displayed in the display interface of the electronic device to obtain at least one window group includes: obtaining all top-level windows of the electronic device; based on the obtained top-level windows, filtering to obtain top-level windows visible to a user; and grouping the top-level windows visible to the user to obtain the at least one window group.
[0016] In this way, by grouping and processing only the top-level windows, it is possible to avoid the situation where only the child windows or owned windows in a certain window group are displayed with the first brightness, resulting in the corresponding parent window or owner window that the user is also paying attention to not being displayed with the first brightness, thereby improving the user experience, reducing the number of windows obtained and processed, and improving processing efficiency.
[0017] In another possible implementation, based on the acquired top-level window, filtering out the top-level window visible to the user includes: for any top-level window: determining an unobstructed area in the top-level window; based on a target point in the unobstructed area, obtaining a visible window corresponding to the target point; and when the visible window and the top-level window are the same window, determining that the top-level window is a top-level window visible to the user.
[0018] In this way, the top-level windows visible to the user can be conveniently, efficiently and relatively accurately screened out, thereby avoiding subsequent invalid processing of windows invisible to the user.
[0019] In another possible implementation, determining the unobstructed area in the top-level window includes: based on the area corresponding to the top-level window, cutting off the part of the area corresponding to the window on the upper layer of the top-level window that exceeds the area corresponding to the top-level window; respectively obtaining the edges and endpoints of each window after cutting off; based on the edges and endpoints of each window after cutting off, dividing the scan line into corresponding line segments along the extension direction of the scan line; based on the scan line divided into line segments, scanning the area corresponding to the top-level window from left to right along a direction perpendicular to the scan line, and numerically marking the corresponding line segments on the scan line according to the edge of the window passed by the scan line during scanning, wherein the initial value of the numerical value is 0, when the scan line passes through the left boundary of the window, the numerical value of the line segment on the scan line corresponding to the edge of the left boundary of the window is increased by 1, and when the scan line passes through the right boundary of the window, the numerical value of the line segment on the scan line corresponding to the edge of the right boundary of the window is reduced by 1; and the area scanned by the line segment on the scan line with the numerical value marked as 1 is determined as the unobstructed area in the top-level window.
[0020] In this way, the unobstructed area of the window can be determined conveniently and efficiently through the scanning line algorithm, thereby improving processing efficiency and accuracy.
[0021] In another possible implementation, grouping the top-level windows visible to the user to obtain the at least one window group includes: grouping the top-level windows visible to the user to obtain the at least one window group according to an overlapping relationship between the top-level windows visible to the user.
[0022] In this way, the overlapping windows can be displayed as a whole to improve efficiency, and the non-overlapping windows can be distinguished, so that the windows that do not block each other can be highlighted at the same time with the first brightness as much as possible.
[0023] In a second aspect, an electronic device is provided, the electronic device comprising: a processor, a memory, and a communication interface. The memory and the communication interface are coupled to the processor, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method as described in any one of the above-mentioned first aspects.
[0024] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes any one of the methods described in the first aspect.
[0025] According to a fourth aspect, a computer program product comprising computer instructions is provided. When the computer instructions are executed on an electronic device, the electronic device executes the method as described in any one of the above-mentioned first aspects.
[0026] In a fifth aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the method described in the first aspect above. In a possible design, the device also includes a memory for storing necessary program instructions and data for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.
[0027] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a hardware structure block diagram of an electronic device provided in an embodiment of the present application; Figure 2 is a system structure block diagram of an electronic device provided in an embodiment of the present application; Figure 3 It is a flow chart of a display method provided in an embodiment of the present application; Figure 4 This is a schematic diagram of an application scenario for grouping windows provided in an embodiment of the present application; Figure 5 This is another application scenario schematic diagram of grouping windows provided in an embodiment of the present application; Figure 6A-6F All of them are schematic diagrams of application scenarios for determining an unobstructed area of a window provided in an embodiment of the present application; Figure 7 This is a schematic diagram of an application scenario when a display method provided by an embodiment of the present application is applied; Figure 8 It is a schematic diagram of an application scenario when another display method provided in an embodiment of the present application is applied; Fig. 9 It is a schematic diagram of an application scenario when another display method provided in an embodiment of the present application is applied; Fig.10 It is a schematic diagram of an application scenario when another display method provided in an embodiment of the present application is applied; Fig.11 It is a schematic diagram of an application scenario when another display method provided in an embodiment of the present application is applied; Fig.12 It is a structural schematic diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also include plural expressions, unless the context clearly indicates otherwise. It should also be understood that " / " means or, for example, A / B can mean A or B; "and / or" in the text is merely a description of an association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0030] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0031] The terms "first" and "second" in the following embodiments of the present application are used for descriptive purposes only and should not be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more.
[0032] With the rapid development of laptops, it has become common for people to use laptops for entertainment or work.
[0033] In order to provide users with better display effects, many laptops currently choose to configure the screen as an organic light-emitting diode (OLED) screen. However, OLED screens may burn in after long-term use, resulting in color difference problems.
[0034] In this regard, the present application provides a display method, which is applied to electronic devices. When the window in the display interface changes, the electronic device can group the windows displayed in the display interface to obtain at least one window group, and the windows in the same window group have an overlapping relationship. Thus, at least one window in each window group can be displayed according to the first brightness, and other display areas other than the window displayed according to the first brightness in the display interface can be displayed according to the second brightness, wherein the first brightness is greater than the second brightness. Thus, when displaying multiple windows, the electronic device can display some windows at normal brightness based on each window group for user viewing, and display other display areas other than the windows displayed at normal brightness at low brightness. While ensuring that the user can view some windows normally, the display brightness of other display areas can be reduced, and then the screen power consumption can be reduced by displaying some display areas at low brightness, and for OLED screens, the burn-in phenomenon of OLED screens used in electronic devices can be slowed down during long-term use.
[0035] A display method provided in an embodiment of the present application can be applied to an electronic device that can display multiple windows through a screen (or display screen, display, display panel, etc.). For example, the electronic device can be a personal computer (PC), a laptop computer, a tablet computer, etc. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device.
[0036] Taking the electronic device as a laptop as an example, refer to Figure 1 , which is a hardware structure block diagram of an electronic device provided in an embodiment of the present application.
[0037] like Figure 1 As shown, the electronic device may include components such as a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (WiFi) module 170, a processor 180, a power supply 190, and a Bluetooth module 1100. Those skilled in the art will appreciate that Figure 1 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0038] Combine the following Figure 1 A detailed introduction to some components of electronic equipment: The memory 120 can be used to store software programs and modules. The processor 180 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 120. The memory 120 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as an audio playback function, etc.), a boot loader, etc.; the data storage area can store data created according to the use of the electronic device (such as audio data, etc.). In addition, the memory 120 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0039] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131 can collect user touch operations on or near it (such as operations performed by the user using fingers, stylus, or any other suitable object or accessory on or near the touch panel 131), and drive the corresponding connection device according to a pre-set program. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0040] The display unit 140 may be used to display information input by the user or information provided to the user and various menus of the electronic device. The display unit 140 may include a display panel 141 (or screen), and the display panel 141 may be configured in the form of a liquid crystal display (LCD), an OLED, or the like.
[0041] The processor 180 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs or modules stored in the memory 120, and calling data stored in the memory 120, so as to monitor the electronic device as a whole. Optionally, the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 180.
[0042] The electronic device can realize audio functions such as music playing and recording through the audio circuit 160 and the speaker 161 and microphone 162 connected to the audio circuit 160 .
[0043] The audio circuit 160 is used to convert a digital audio signal into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio circuit 160 can also be used to encode and decode an audio signal. In some embodiments, the audio circuit 160 can be arranged in the processor 180, or some functional modules of the audio circuit 160 can be arranged in the processor 180. The speaker 161, also known as a "speaker", is used to convert an audio electrical signal into a sound signal. The microphone 162, also known as a "microphone", is used to convert a sound signal into an electrical signal. In an embodiment of the present application, when a user wants to play a first stereo audio through an electronic device, the user can first operate the electronic device to start a first application, and then perform a first operation of playing the first stereo audio. Thus, the electronic device can obtain a first stereo audio signal corresponding to the first stereo audio in response to the user's first operation. Afterwards, the electronic device can render the first stereo audio signal through the audio playback method provided in the present application to obtain a target stereo audio signal. Furthermore, the electronic device can convert the target stereo audio signal into an analog audio signal through the audio circuit 160, and output it as a sound signal through the speaker 161 to achieve the external release of the audio.
[0044] Among them, multiple speakers 161 can be set according to actual needs, and the setting position of the speakers 161 on the electronic device can also be configured according to actual needs. For example, taking the electronic device as a laptop computer, the speakers 161 can be set to 2 and located on both sides of the laptop computer keyboard; or the speakers 161 can be set to 4, two of which are located on both sides of the laptop computer keyboard, and the other two are located on both sides of the laptop computer display panel 141, etc.
[0045] Of course, it is understandable that the above Figure 1 The electronic device is shown as an example when it is in the form of a laptop computer. If the electronic device is in other device forms such as a personal computer, a tablet computer, a handheld computer, etc., the structure of the electronic device may include Figure 1 The structure shown in the figure is less than Figure 1 More structures are shown in the figure, which are not limited here.
[0046] It is understandable that the realization of electronic device functions requires the cooperation of software architecture in addition to hardware support. In some examples, the operating system used by the electronic device 100 may include but is not limited to Windows TM (Windows TM ),appleTM (MacOS TM 、iOS TM ), Hongmeng TM (HarmonyOS TM ), Linus TM (Linux TM ), Unex TM (Unix TM ),blackberries TM (Blackberry TM ), Saipan TM (Symbian TM ) or Android TM (Android TM ) and other operating systems.
[0047] Here, the operating system running in the electronic device 100 is Windows TM The system is taken as an example for explanation.
[0048] Figure 2 It is a system structure block diagram of the electronic device provided in the embodiment of the present application.
[0049] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. TM The system is divided into four layers, from top to bottom: application layer, service layer, operating system (OS) layer and hardware layer.
[0050] The application layer, which can include a series of applications, is located above the service layer. Figure 2 As shown, it can include music, video, office and other applications (or software). Of course, the application layer can also include other application packages, such as calendar, chat and other applications, which are not limited in this application. The application can interact with the service layer through the application programming interface (API) provided by the operating system to realize its functions.
[0051] The service layer can provide system-level services, including system services and user mode services, as well as background services. Figure 2As shown, the service layer may include a PC butler, through which the functional services corresponding to the display method of the present application are provided. Among them, the PC butler may include functional modules such as a focus monitoring module, a mask management module, and a desktop special judgment module, so as to jointly realize the functions corresponding to the display method provided in the embodiment of the present application. Of course, in actual applications, the service layer can also provide other services, such as running in user mode, providing user mode services for interactive functions between user interfaces and applications; running in kernel mode, providing system-level functions, such as security authentication, inter-process communication, system monitoring, etc., which are not limited here.
[0052] The operating system layer may be responsible for managing hardware resources and providing basic system services. Figure 2 As shown, the operating system layer may include system services such as message management, window management, and drawing management.
[0053] Window management can be used to create, display, hide, move, resize, and other operations on windows. In the system, window management is mainly implemented through the desktop window manager (DWM) component, which is the core component of the desktop environment and is responsible for handling window display and management.
[0054] Message management refers to the use of message mechanisms by the operating system to facilitate communication between applications and the operating system. Whenever an event occurs (such as a keyboard key, mouse movement, or system event), the operating system generates a corresponding message. These messages are sent to a specific message queue and then processed by the application's message loop. Each thread that creates a window has a message queue to store messages waiting to be processed. These messages include user actions (such as mouse clicks, keyboard operations) and system notifications (such as window redraw requests, system shutdown notifications, etc.).
[0055] Drawing management can render and display graphics, mainly through the graphics device interface (graphics device interface, GDI), which provides a series of functions to draw graphics, text and images.
[0056] Of course, in actual applications, the operating system layer may also include other system services, as well as other modules such as the kernel and drivers, which are not limited here.
[0057] The hardware layer may include CPU, memory, storage devices, input and output devices (such as mouse, keyboard, speakers, microphones), etc.
[0058] In an embodiment of the present application, the electronic device can monitor whether the window in the display interface of the electronic device changes through the focus monitoring module in the PC housekeeper based on the above-mentioned software system architecture. When the window changes, the electronic device can call the window management module through the focus monitoring module, so as to group all the windows displayed in the display interface based on the window management module, and divide the windows with overlapping relationships into the same window group to obtain at least one window group. Then, the electronic device can set a mask at the corresponding position according to the position of each window displayed at the first brightness as needed through the mask management module in the PC housekeeper, so as to draw and display the display interface through the drawing management module, so that the window on the upper layer of the mask in the display interface of the electronic device is displayed at the first brightness, and other areas under the mask are displayed at the second brightness.
[0059] Based on the above hardware architecture and software architecture, the display method provided in the embodiment of the present application is introduced below by taking the electronic device as a laptop computer as an example.
[0060] Reference Figure 3 FIG. 1 is a flow chart of a display method provided by an embodiment of the present application. The display method can be applied to electronic devices (such as laptop computers), such as Figure 3 As shown, the display method may specifically include S301-S303.
[0061] S301: Detecting a change in the window of the notebook computer.
[0062] Among them, a window refers to a rectangular area in a user interface, through which a user can interact with an application. Usually, when a user uses an application in a laptop computer, the laptop computer can display the interface of the corresponding application through the window corresponding to the application in the display interface. Thus, the user can interact with the corresponding application through the window. The interfaces of different applications can be displayed through different windows, and different interfaces of the same application can be displayed through different windows or through the same window. The window of a laptop computer can be a visible window displayed on the display interface of the screen, or it can be an invisible window that is not displayed on the display interface of the screen.
[0063] The various windows displayed on a laptop usually include top-level windows, topmost windows, parent windows and child windows with a parent / child relationship, and owner windows and owned windows with an owning / owned relationship.
[0064] Among them, the top-level window is a window that is not associated with any other windows and can exist and operate independently. Usually, in the entire window tree, the top-level window is a first-level window.
[0065] A top window is a window that can always stay in the front (or topmost) of all windows. You can set the corresponding window as a top window by configuring the "WS_EX_TOPMOST" window extended attribute for the corresponding window. Usually, you can use the SetWindowLong function to dynamically add or remove the "WS_EX_TOPMOST" window extended attribute for a window. You can use the GetWindowLongPtr function to get the window style, so as to determine that the window is a top window when the window style contains the "WS_EX_TOPMOST" window extended attribute.
[0066] There is a strict hierarchy between the parent window and the child window. The child window is part of the parent window and cannot exist independently of the parent window. The life cycle of the child window is usually closely related to the parent window. When the parent window is closed, all its child windows will also be closed. The top-level window can be a parent window and have corresponding child windows. Correspondingly, the child window can also be a parent window and have its own child windows, thus forming a window tree with a parent / child relationship. When displayed, the child window is usually located on the upper layer of its parent window.
[0067] Between the owner window and the owned window, the owned window can exist independently of the owner window, and the life cycle of the owned window can be independent of the owner window. When the owner window is destroyed, the owned window will not be automatically destroyed and can continue to exist. The top-level window can own the corresponding owned window as the owner window, and correspondingly, the owned window can also own its own owned window as the owner window, thus forming a window tree with an owning / owned relationship. When displayed, the owned window is usually located above its owner window.
[0068] For each window in the notebook display interface, the Z order can usually be obtained by sorting according to the Z axis extending from the screen to the outside of the screen. In the Z order of windows, the Z order value of the upper window is greater than the Z order value of the lower window, among which the top window is located at the top of all windows and has the largest Z order value.
[0069] Changes in windows in the display interface of the laptop computer generally include the switching of the foreground window in the display interface, that is, the window currently operated by the user is switched from the first window to the second window; at least one window in the display interface enters a minimized state; the laptop computer creates a new window; the Z order of the windows of the laptop computer changes; and the laptop computer closes at least one window, etc.
[0070] Usually, the foreground window will be displayed above other non-top windows, that is, the foreground window will be located above other non-top windows in the Z order. Therefore, when the foreground window in the display interface is switched, it is usually accompanied by a change in the Z order of the laptop computer's windows. At this time, it is necessary to redisplay each window according to the display method provided by the present application. Similarly, when at least one window in the display interface enters a minimized state, or the laptop creates a new window, or the laptop closes at least one window, etc., when the windows in the display interface of the laptop computer change, it is usually accompanied by a change in the Z order of the laptop computer's windows. At this time, it is also necessary to redisplay each window according to the display method provided by the present application.
[0071] As a possible implementation, the laptop computer may configure monitoring of corresponding events through the SetWinEventHook function, so as to monitor events that may cause changes in windows in the display interface, thereby detecting whether the windows in the display interface have changed.
[0072] S302: Group windows displayed in the display interface to obtain at least one window group.
[0073] Generally, when a user performs multitasking operations through one or more application programs, a laptop computer will display multiple windows at the same time so that the user can perform corresponding task operations through these windows respectively. Therefore, when multiple windows are displayed in the interface, these windows can be grouped. Of course, when only one window is displayed in the display interface of the laptop computer, the window can also be directly used as a window group.
[0074] As a possible implementation, the windows may be grouped according to the overlapping relationship between the windows (for example, intersecting windows may be identified and merged for grouping using a related union-find algorithm), so that when at least one window in each window group is subsequently displayed at the first brightness, the windows corresponding to the window groups will not block each other, thereby improving the user experience.
[0075] For example, windows with overlapping areas may be grouped into the same window group, that is, windows stacked together may be grouped into one window group. Figure 4 As shown, the display interface of the laptop computer may include a first window 411, a second window 412, and a third window 413 having mutually overlapping areas, and a fourth window 421, a fifth window 422, and a sixth window 423 having mutually overlapping areas. At this time, the first window 411, the second window 412, and the third window 413 having mutually overlapping areas may be divided into one window group, and the fourth window 421, the fifth window 422, and the sixth window 423 having mutually overlapping areas may be divided into another window group.
[0076] For example, windows with overlapping associations may also be grouped into the same window group. Figure 5 As shown, the display interface of the laptop may include a first window 501 and a second window 502 having an overlapping area, and a third window 503 having an overlapping area with the first window 501 but not overlapping with the second window 502. Then, since the second window 502 and the third window 503 have overlapping areas with the first window 501 respectively, that is, the first window 501, the second window 502 and the third window 503 have an overlapping association, the first window 501, the second window 502 and the third window 503 can be divided into a window group.
[0077] In the embodiment of the present application, when grouping the windows displayed in the display interface, the windows displayed in the display interface of the notebook computer may be enumerated first, and then the windows displayed in the display interface may be grouped.
[0078] As a possible implementation, the windows displayed in the display interface of the laptop computer can be enumerated by first obtaining all top-level windows created by the laptop computer, and then filtering out top-level windows visible to the user based on these top-level windows, so that these top-level windows visible to the user can be grouped subsequently.
[0079] The laptop can obtain all top-level windows created by the laptop by calling the EnumWindows function, and then filter out the top-level windows visible to the user based on the scan line algorithm and the WindowFromPoint function.
[0080] For example, when a laptop computer screens out top-level windows visible to the user based on the scan line algorithm and the WindowFromPoint function, the laptop computer can determine whether each top-level window is visible to the user in order from the top window to the bottom window (i.e., the Z order is from large to small) according to the Z order of each top-level window obtained, and enumerate and record the top-level windows visible to the user in order to group the enumerated top-level windows visible to the user (i.e., the windows displayed in the display interface) later. Of course, in actual applications, it is also possible to determine whether each top-level window is visible to the user in order in any order (or random order), as long as the visibility of each obtained top-level window can be judged separately.
[0081] Among them, when determining whether a top-level window is visible to the user, the laptop can first determine the unobstructed area in the top-level window through the scan line algorithm, and then obtain the visible window corresponding to the point through the WindowFromPoint function according to the target point in the area (the target point can be any point in the area, such as the midpoint of the area, etc.). If the window can be obtained and the obtained window is the top-level window, then the top-level window can be determined to be a window visible to the user. Of course, if the unobstructed area in the top-level window cannot be determined, it means that the window is completely obstructed, so the window can be determined to be a window invisible to the user.
[0082] For example, take determining the unobstructed area in the first window as an example. Fig. 6A As shown in the figure, the upper layer of the first window 601 also includes the second window 602, the third window 603 and the fourth window 604, and the second window 602, the third window 603 and the fourth window 604 have overlapping areas with the first window 601. Then, based on the scan line algorithm, based on the area corresponding to the first window 603, the parts of other windows located in the upper layer of the first window 603 (such as the second window 602, the third window 603 and the fourth window 604 shown in the figure) that exceed the area corresponding to the first window 601 can be cut off, so as to obtain the following Figure 6B The cropped window area and window edges are shown.
[0083] Afterwards, based on the cut Figure 6B The window area and the edge of the window shown in FIG. 1 are used to obtain the edge and the endpoint of each window (for example, Figure 6C The circled endpoints in Figure 6C As shown, the scan line can be divided into corresponding line segments based on these endpoints along the extension direction of the scan line, such as line segment (1), line segment (2), line segment (3) and line segment (4) shown in the figure.
[0084] Subsequently, the laptop computer can scan the window area of the first window 601 from left to right based on the scan line divided into line segments, and numerically mark the line segments corresponding to the scan line according to the edge of the window passed during the scan. Specifically, the numerical initial value of each line segment on the default scan line may be 0, and when the scan line passes through the edge of the left border of a window, the numerical value of the line segment on the scan line at the corresponding position of the edge is increased by 1 (used to mark that the scan line has scanned the left border of a window and will subsequently scan the area corresponding to the window), and when the scan line passes through the edge of the right border of a window, the numerical value of the line segment on the scan line at the corresponding position of the edge is reduced by 1 (used to mark that the scan line has scanned the right border of a window and will subsequently leave the area corresponding to the window). For example, Fig.6DAs shown, taking the case where the scan line scans to the left edge of the first window 601 as an example, at this time, the values of the scan line segments (1) to (4) at the position where the edge of the left edge of the first window 601 is located can be increased by 1 respectively, and because the scan line is also located at the edge of the left edge of the second window 602 at this time, the values of the scan line segments (1) and (2) at the position where the edge of the left edge of the second window 602 is cropped can also be increased by 1 respectively. Therefore, Fig.6D As shown, at this time, the values of line segment (1) and line segment (2) on the scan line are 2, and the values of line segment (3) and line segment (4) are 1. For another example, Fig. 6E As shown, taking the case where the scan line scans the left border of the third window 603 as an example, at this time, the values of the line segments (2) to (4) of the scan line at the position where the left border of the third window 603 is cut can be increased by 1 respectively. Fig. 6E As shown, the value of line segment (1) on the scan line remains unchanged at 2, the value of line segment (2) becomes 3, and the values of line segment (3) and line segment (4) become 2. For another example, Fig. 6F As shown, when the scan line scans the right edge of the second window 602, for example, the values of the line segment (1) and the line segment (2) of the scan line at the position of the cropped edge of the right edge of the second window 602 can be reduced by 1 respectively. Fig. 6F As shown, the value of line segment (1) on the scan line becomes 1, the value of line segment (2) becomes 2, and the values of line segment (3) and line segment (4) remain unchanged at 2. This process is repeated until the scan line scans to the right edge of the first window 601, completing the scanning of the first window 601.
[0085] Through the numerical marking of each line segment on the scanning line during the scanning process, it can be seen that the area scanned by the line segment with a value of 1 is the area including only the first window 601, so that the area scanned by the line segment with a value of 1 in the scanning line can be determined as the area not blocked by the first window 601 (for example Fig. 6F ).
[0086] It should be noted that the above example is merely an illustrative description of scanning the first window from left to right by scanning lines to determine the unobstructed area in the first window. In other possible implementations, the window can also be scanned from top to bottom, or from right to left, or from bottom to top by setting the scanning lines to determine the unobstructed area in the window. There is no limitation here, and the specific implementation is similar to the implementation of the above example, so it will not be repeated here.
[0087] Optionally, based on the above example, in the process of the laptop computer screening out the top-level windows visible to the user based on the scan line algorithm and the WindowFromPoint function, after determining that a certain window (such as the first window) is a window visible to the user, the GetAncestor function can also be used to obtain the window tree corresponding to the window, thereby determining whether the window is a top-level window. When the window is a top-level window, it is determined to be a top-level window visible to the user and recorded. In this way, it can be avoided that when the laptop computer obtains all the top-level windows it has created in the early stage due to reasons such as function execution errors, the obtained windows include windows that are not top-level windows, and then the user visibility of these windows that are not top-level windows is judged later, and the visible windows that are not top-level windows are also recorded. In this way, it is convenient for the subsequent laptop computer to group only the top-level windows displayed in the display interface, excluding the sub-windows and owned windows associated with the top-level windows.
[0088] Of course, in actual applications, as another possible implementation, the child windows and owned windows associated with the top-level window may not be excluded, so as to directly obtain all windows created by the laptop computer, and then filter out the user-visible windows from these windows in a manner similar to the aforementioned example of filtering the top-level windows. That is, the way to enumerate the windows displayed in the display interface of the laptop computer may be to first obtain all windows created by the laptop computer, and then filter out the user-visible windows based on these windows, so that these user-visible windows can be grouped later. The specific implementation is similar to the aforementioned example, except that the filtering is changed from only filtering the acquired top-level windows to filtering all acquired windows, so it will not be repeated here.
[0089] Optionally, before the laptop computer determines whether a window is visible to the user, it can also determine whether the window is in a minimized state, so that when it is determined that the window is not in a minimized state, the user visibility determination of the aforementioned implementation method is applied to the window. Since a window is usually invisible to the user when it is in a minimized state, the user visibility of the window can be preliminarily determined in advance through the minimized state by determining the minimized state in advance, thereby avoiding the subsequent visibility determination step for the minimized window and improving the efficiency of screening windows visible to the user.
[0090] For example, the laptop computer may first obtain the window style of the window whose user visibility is to be determined based on the GetWindowLongPtr function, and then determine whether the window is in the minimized state based on whether the window style includes a window style constant (WS_MINIMIZE) for indicating that the window is minimized.
[0091] S303: Display at least one window in each window group at a first brightness, and display other display areas at a second brightness, wherein the first brightness is greater than the second brightness.
[0092] Among them, the other display areas are display areas that are not displayed according to the first brightness.
[0093] As a possible implementation, at least one window in each window group is displayed at a first brightness, and other display areas are displayed at a second brightness, which can be achieved by displaying the top window in each window group (i.e., the window with the largest Z order value in each window group) at the first brightness, and displaying other display areas at the second brightness. Thus, the windows displayed in the display interface of the laptop computer that do not block each other can be displayed relatively brightly at the same time, which is convenient for users to perform multitasking based on these windows, and convenient for users to operate and switch between multiple windows, thereby improving the convenience of multitasking for users. At the same time, based on the relatively low brightness display of other display areas, the screen power consumption can be reduced, and the risk of screen burn-in can be reduced for OLED screens. It can also avoid unnecessary visual interference caused by other display areas to the user's multitasking, and keep the user's attention on the main windows that do not block each other.
[0094] For example, Figure 7 As shown, take the case where the display interface of a laptop displays a first window 701, a second window 702, a third window 703 and a fourth window 704, the first window 701 and the second window 702 have an overlapping relationship and are divided into a first window group, and the first window 701 is located on the upper layer of the second window 702 (that is, the Z order value of the first window 701 is greater than the Z order value of the second window 702), the third window 703 and the fourth window 704 have an overlapping relationship and are divided into a second window group, and the third window 703 is located on the upper layer of the fourth window 704 (that is, the Z order value of the third window 703 is greater than the Z order value of the fourth window 704). Then, as Figure 7 As shown, the top first window 701 in the first window group and the top third window 703 in the second window group may be displayed at the first brightness, and other display areas may be displayed at the second brightness.
[0095] As another possible implementation, based on the above example, when the laptop displays the top window in each window group at the first brightness, if a window in the top window of the corresponding window group (such as the top window of the first window group) is not a top-level window and has a corresponding parent window or owner window, the parent window or owner window corresponding to the window can also be displayed at the first brightness. Generally, for windows with parent windows or owner windows, users may pay more attention to the contents of the upper-level windows (i.e., parent windows or owner windows) of these windows. Therefore, by displaying the main windows that do not block each other and the corresponding parent windows or owner windows at a relatively high brightness, the windows that the user needs to pay attention to can be better highlighted, while reducing the brightness of other display areas, so as to improve the user experience while reducing the screen power consumption and the risk of screen burn-in by reducing the brightness of some areas.
[0096] For example, Figure 8 As shown, take the case where the display interface of a laptop displays a first window 801, a second window 802, a third window 803 and a fourth window 804, the first window 801 and the second window 802 have an overlapping relationship and are divided into a first window group, and the first window 801 is located on the upper layer of the second window 802 (that is, the Z order value of the first window 801 is greater than the Z order value of the second window 802), the first window 801 is a child window (or an owned window), the second window 802 is the parent window (or owner window) of the first window 801, the third window 803 and the fourth window 804 have an overlapping relationship and are divided into a second window group, and the third window 803 is located on the upper layer of the fourth window 804 (that is, the Z order value of the third window 803 is greater than the Z order value of the fourth window 804). Then, as Figure 8 As shown, the top first window 801 in the first window group, the parent window (or owner window) second window 802 of the first window 801, and the top third window 803 in the second window group can be displayed at the first brightness, and other display areas can be displayed at the second brightness.
[0097] As another possible implementation, when a certain window group includes a top window, the top window and the window of the next layer of the top window (i.e., the top window in the window group except the top window) can be displayed at the first brightness. That is, at least one window in each window group is displayed at the first brightness, and other display areas are displayed at the second brightness, and the top window in each window group except the top window (i.e., the window with the largest Z order value in each window group except the top window) and all top windows displayed in the display interface are displayed at the first brightness. In this way, the top window can always maintain a relatively high brightness display, ensuring that the top window meets the user's expectation of always paying attention to it, thereby improving the user experience.
[0098] For example, Fig. 9 As shown, a laptop computer display interface displays a first window 901, a second window 902, a third window 903, a fourth window 904, and a fifth window 905. The first window 901, the second window 902, and the third window 903 have an overlapping relationship and are divided into a first window group, and the first window 901 is a top window on the upper layer of the second window 902, the second window 902 is on the upper layer of the third window 903, the fourth window 904 and the fifth window 905 have an overlapping relationship and are divided into a second window group, and the fourth window 904 is on the upper layer of the fifth window 905. Then, as Fig. 9 As shown, the top window (first window 901) in the first window group and the top window (second window 902) other than the top window, as well as the top fourth window 904 in the second window group can be displayed at the first brightness, and other display areas can be displayed at the second brightness.
[0099] Optionally, when the top window in each window group is displayed at the first brightness on a laptop computer based on the above example, if a window in the top window of the corresponding window group (such as the top window of the first window group) has other windows of the same process, the top window area may be extremely small and almost invisible to the user, resulting in no window in the window group being displayed at the first brightness for the user, thereby affecting the user experience. Fig.10As shown, a certain window group may include a first window 1001, a second window 1002, and a third window 1003, the first window 1001 is located on the upper layer of the second window 1002, the second window 1002 is located on the upper layer of the third window 1003, and the first window 1001 is a very small window (almost invisible to the user, such as a window approximately horizontally lined with a height of one pixel), the first window 1001 and the second window 1002 are in the same process, then if only the first window 1001 at the top of the window group is displayed with the first brightness, it is almost invisible to the user, so that there is no relatively highlighted window in the window group for the user. At this time, the content in the second window 1002 may also need to be paid attention to by the user because it is in the same process as the first window 1001, so the second window 1002 in the same process as the first window 1001 can be displayed at the first brightness later, thereby improving the user experience.
[0100] Therefore, as another possible implementation, based on the above example, when the laptop displays the top window of each window group at the first brightness, if a window in the top window of the corresponding window group (such as the top window of the first window group) has other windows of the same process, then all windows under the process corresponding to the window can also be displayed at the first brightness. Thus, it can be avoided that when the same process includes multiple windows, only the windows with extremely small areas (windows that are almost invisible to the user) in the window group are displayed at a relatively high brightness based on the top window, and the windows that need more attention from the user are not displayed at a relatively high brightness, thereby improving the user experience.
[0101] For example, Fig.11 As shown, a laptop computer display interface displays a first window 1101 (which may be a window with a very small area), a second window 1102, a third window 1103, and a fourth window 1104. The first window 1101 and the second window 1102 have an overlapping relationship and are divided into a first window group, and the first window 1101 is located on the upper layer of the second window 1102. The first window 1101 and the second window 1102 are windows under the same process, and the third window 1103 and the fourth window 1104 have an overlapping relationship and are divided into a second window group, and the third window 1103 is located on the upper layer of the fourth window 1104. Then, as Fig.11 As shown, the top first window 1101 in the first window group, the window (second window 1102) in the same process as the first window 1101, and the top third window 1103 in the second window group can be displayed at the first brightness, and the other display areas can be displayed at the second brightness.
[0102] For example, when at least one window in each window group is displayed at a first brightness and other display areas are displayed at a second brightness, the laptop computer can determine the representative windows of each window group in each window group, and then display the target window at the bottom layer (i.e., the smallest Z order value) and other windows above the target window (i.e., other windows with a Z order value greater than that of the window) in the representative windows of each window group at the first brightness, and display other display areas at the second brightness, thereby realizing the implementation example of displaying at least one window in each window group at the first brightness as illustrated in the above example. For example, a mask can be set below the determined target window to realize that each window above the mask (i.e., the target window and other windows above the target window) is displayed at the first brightness, while other display areas blocked below the mask are displayed at the second brightness.
[0103] Based on this example, when determining the representative window of each window group, the window located at the top layer in the window group can be used as the representative window of the corresponding window group. For example, a window group includes window A, window B, and window C, window A is on the top layer of window B, and window B is on the top layer of window C, then window A in the window group can be used as the representative window of the window group.
[0104] Alternatively, when determining the representative window of each window group, the window at the top layer in the window group can be used as the representative window of the corresponding window group. When the window at the top layer is not a top-level window but has a parent window or an owner window, the parent window or the owner window of the window at the top layer can be used as the representative window of the corresponding window group. For example, a window group includes window A, window B, and window C, window A is on the upper layer of window B, window B is on the upper layer of window C, and window A is the child window of window B (that is, window B is the parent window of window A), then the parent window (window B) of window A at the top layer in the window group can be used as the representative window of the window group.
[0105] Alternatively, when determining the representative window of each window group, the top window in the window group except the top window can be used as the representative window of the corresponding window group. Of course, when no window is specified in a window group, the top window in the window group is the top window except the top window. For example, a window group includes window A, window B and window C, window A is on the top of window B, window B is on the top of window C, and window A is a top window, then the top window B in the window group except the top window can be used as the representative window of the window group.
[0106] Alternatively, when determining the representative window of each window group, the window at the top layer in the window group can be used as the representative window of the corresponding window group. When there are other windows under the process where the top layer window is located, the bottom layer window of all windows under the process where the top layer window is located can be used as the representative window of the corresponding window group. For example, a window group includes window A, window B, and window C, window A is on the top layer of window B, window B is on the top layer of window C, and window A and window B are under the same process, then the bottom layer window (window B) of all windows under the process where the top layer window A in the window group is located can be used as the representative window of the window group.
[0107] It should be noted that the aforementioned examples of displaying at least one window in each window group at a first brightness and displaying other display areas at a second brightness can be combined and implemented according to actual needs in actual applications, and are not limited here.
[0108] It should also be noted that, based on the aforementioned example, when only one window group is obtained after grouping the windows displayed in the display interface, the aforementioned example method can be used only for this one window group to display at least one window in the window group at the first brightness, and the other display areas at the second brightness.
[0109] In the present application, the display method of the above example is provided, so that when displaying multiple windows, an electronic device (such as a laptop computer) can display some windows at normal brightness based on each window group for user viewing, and display other display areas other than the windows displayed at normal brightness at low brightness. While ensuring that the user can view some windows normally, the display brightness of other display areas can be reduced, and then the screen power consumption can be reduced by displaying some display areas at low brightness, and for OLED screens, the burn-in phenomenon of OLED screens used in electronic devices during long-term use can be reduced. In addition, by displaying other display areas at low brightness, the visual interference of other display areas to the windows viewed by the user can be reduced, thereby improving the user's multitasking experience.
[0110] It is obvious that those skilled in the art can make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.
[0111] It is understandable that, in order to realize the above functions, the above electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0112] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0113] An embodiment of the present application also provides an electronic device, which includes: a memory and one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method provided in the aforementioned embodiment.
[0114] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method provided in the above embodiment.
[0115] An embodiment of the present application also provides a computer program product, which includes executable instructions. When the computer program product is run on an electronic device, the electronic device executes the method provided in the above embodiment.
[0116] The present application also provides a chip system, such as Fig.12 As shown, the chip system 1200 includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 can be interconnected through a line. For example, the interface circuit 1202 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 1202 can be used to send signals to other devices (such as the processor 1201).
[0117] Exemplarily, the interface circuit 1202 can read the instruction stored in the memory and send the instruction to the processor 1201. When the instruction is executed by the processor 1201, the chip system can execute each step in the above embodiment. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
[0118] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0119] In the several embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0122] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0123] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A display method, characterized in that: Applied to electronic equipment, the method comprises: Detecting a change in a window of the electronic device; Grouping the windows displayed on the display interface of the electronic device to obtain at least one window group, wherein the windows in the same window group have an overlapping relationship; At least one window in each of the window groups is displayed at a first brightness, and other display areas of the display interface are displayed at a second brightness, wherein the first brightness is greater than the second brightness.
2. The method according to claim 1, characterized in that The step of displaying at least one window in each of the window groups at a first brightness and displaying other display areas of the display interface at a second brightness includes: The topmost window in each of the window groups is displayed at the first brightness, and other display areas in the display interface are displayed at the second brightness.
3. The method according to claim 2, characterized in that When the at least one window group includes a first window group, and the topmost window in the first window group has a corresponding parent window or an owner window, displaying at least one window in each of the window groups at a first brightness and displaying other display areas of the display interface at a second brightness further includes: The parent window or the owner window corresponding to the topmost window in the first window group is displayed according to the first brightness.
4. The method according to claim 2, characterized in that: When the at least one window group includes a first window group, and the topmost window in the first window group has a window of the same process, displaying at least one window in each of the window groups at a first brightness and displaying other display areas of the display interface at a second brightness further includes: All windows under the process where the top window in the first window group is located are displayed according to the first brightness.
5. The method according to claim 1, characterized in that The step of displaying at least one window in each of the window groups at a first brightness and displaying other display areas of the display interface at a second brightness includes: The topmost window in each window group except the top window and all the top windows displayed in the display interface are displayed according to the first brightness, and other display areas of the display interface are displayed according to the second brightness.
6. The method according to any one of claims 1 to 5, characterized in that: The grouping of the windows displayed on the display interface of the electronic device to obtain at least one window group includes: Obtain all top-level windows of the electronic device; Based on the acquired top-level windows, filter and obtain top-level windows visible to the user; The top-level windows visible to the user are grouped to obtain the at least one window group.
7. The method according to claim 6, characterized in that The filtering of obtaining a top-level window visible to a user based on the acquired top-level window includes: For any of the top-level windows: Determine an unobstructed area in the top-level window; Based on the target point in the unobstructed area, obtaining a visible window corresponding to the target point; When the visible window and the top-level window are the same window, the top-level window is determined to be a top-level window visible to the user.
8. The method according to claim 7, characterized in that The determining of the unobstructed area in the top-level window includes: Based on the area corresponding to the top-level window, cutting off the part of the area corresponding to the window on the upper layer of the top-level window that exceeds the area corresponding to the top-level window; Get the edges and endpoints of each window after cutting respectively; Based on the edges and endpoints of the cut windows, dividing the scan line into corresponding line segments along the extension direction of the scan line; Based on the scan line divided into line segments, the area corresponding to the top-level window is scanned from left to right along a direction perpendicular to the scan line, and the line segments corresponding to the scan line are numerically marked according to the edge of the window passed by the scan line during scanning, wherein the initial value of the numerical value is 0, when the scan line passes through the left boundary of the window, the numerical value of the line segment on the scan line corresponding to the edge of the left boundary of the window is increased by 1, and when the scan line passes through the right boundary of the window, the numerical value of the line segment on the scan line corresponding to the edge of the right boundary of the window is decreased by 1; The area scanned by the line segment with a value marked as 1 on the scan line is determined as the unobstructed area in the top-level window.
9. The method according to claim 6, characterized in that The step of grouping the top-level windows visible to the user to obtain the at least one window group includes: The top-level windows visible to the user are grouped according to the overlapping relationship between the top-level windows visible to the user to obtain the at least one window group.
10. An electronic device, characterized in that: The electronic device comprises: a processor, a memory and a communication interface; the memory and the communication interface are coupled to the processor, the memory is used to store computer program code, and the computer program code comprises computer instructions; wherein, when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the method according to any one of claims 1 to 9.
12. A chip system, characterized in that: The chip system includes a processor and an interface circuit, and the processor and the interface circuit can be interconnected via lines; wherein the interface circuit is used to receive a signal from an electronic device and send the signal to the processor, and the signal includes a computer instruction; when the processor executes the computer instruction, the chip system executes the method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Managing workspaces in a user interface
CN103229141A
Content based dynamic control methods and systems for display brightness
CN105144021A
Multi-display-brightness data display method and device
CN106020760A
Advanced power management for computer displays
US20060101293A1
Cited By
Software window display control method and system based on X11 environment
CN121029296A