CN114968004A - Window processing method, computing device and readable storage medium - Google Patents

Window processing method, computing device and readable storage medium Download PDF

Info

Publication number
CN114968004A
CN114968004A CN202210556556.3A CN202210556556A CN114968004A CN 114968004 A CN114968004 A CN 114968004A CN 202210556556 A CN202210556556 A CN 202210556556A CN 114968004 A CN114968004 A CN 114968004A
Authority
CN
China
Prior art keywords
window
size
mouse
sliding
computing device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210556556.3A
Other languages
Chinese (zh)
Inventor
张宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202210556556.3A priority Critical patent/CN114968004A/en
Publication of CN114968004A publication Critical patent/CN114968004A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials

Abstract

The invention discloses a window processing method, a computing device and a readable storage medium. The window processing method of the present invention is executed in a window manager of a computing device in which one or more applications are running, the method comprising: detecting that a mouse cursor is positioned in a tab bar area of a window of a target application in one or more applications, and monitoring the triggering operation of a preset key and the sliding operation of a mouse roller; and in response to the operation of sliding the mouse wheel while monitoring the triggering of the preset key, zooming the window of the target application. Therefore, the title bar area of the application window is used as the function trigger area for window scaling, and compared with the edge of the window, the title bar area of the window has enough width and height, so that the user can trigger the window more easily. Therefore, the window processing method based on the invention can adjust the size of the application window more conveniently and quickly, thereby improving the experience of the user.

Description

Window processing method, computing device and readable storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a window processing method, a computing device, and a readable storage medium.
Background
In daily work and life, users often need to adjust the size of an application window. At present, there are two main methods for a user to adjust the size of an application window. First, it is adjusted by the maximize and minimize buttons on the title bar. Specifically, clicking the maximize button displays the window in full screen, and clicking the minimize button hides the window. And the other is adjusted by dragging the edge of the window. Specifically, the mouse is stopped at the edge of the window, and then the left mouse button is pressed and the mouse is moved.
However, both of the above methods have certain disadvantages. The application window size is adjusted by the maximize and minimize buttons, and the window can only be adjusted to a full screen state or a hidden state. Therefore, after the user clicks the maximize button, other application windows except the current application window cannot be displayed on the current screen, and after the user clicks the minimize button, the current application window cannot be displayed on the current screen. Although the size of the window can be dynamically adjusted by dragging the window edge to adjust the size of the window, the window edge trigger area is too narrow, and the operation is not easy for a user. Moreover, when the user shrinks the window in the maximized state, the window needs to exit the maximized state. Obviously, the operation is cumbersome.
Therefore, a new window processing method is needed to solve the above problem.
Disclosure of Invention
To this end, the present invention provides a window processing method, a computing device and a readable storage medium in an effort to solve or at least alleviate the above-existing problems.
According to an aspect of the present invention, there is provided a window processing method adapted to be executed in a window manager of a computing device in which one or more applications are running, the method comprising: detecting that a mouse cursor is positioned in a tab bar area of a window of a target application in the one or more applications, and monitoring the triggering operation of a preset key and the sliding operation of a mouse roller; and in response to the operation of sliding the mouse wheel while monitoring the triggering of the preset key, zooming the window.
Optionally, in the window processing method according to the present invention, the step of scaling the window includes: determining the operation of sliding the mouse wheel to be an amplifying operation or a reducing operation according to the sliding direction of the mouse wheel; if the operation of sliding the mouse wheel is amplification operation, amplifying the window; if the operation of sliding the mouse wheel is a reduction operation, the window is reduced.
Optionally, in the window processing method according to the present invention, the step of enlarging the window includes: when the mouse roller slides for a preset distance, the window is enlarged by a first preset size; in response to the window zooming in to the second predetermined size, zooming in on the window is stopped.
Optionally, in the window processing method according to the present invention, the step of reducing the window includes: when the mouse roller slides for a preset distance, reducing the window by a first preset size; in response to the window shrinking to a third predetermined size, the shrinking of the window is stopped.
Alternatively, in the window processing method according to the present invention, the first predetermined size is associated with a current size of the window or a size of the window when the window is in a maximized state, and the second predetermined size and the third predetermined size are associated with a size of the window when the window is in a maximized state.
Optionally, in the window processing method according to the present invention, the method further includes: and when the operation of triggering the preset key is monitored, switching the mode of the mouse cursor to the preset mode, and displaying the current scaling of the window on the screen of the computing equipment.
Optionally, in the window processing method according to the present invention, the method further includes: and sending the scaled window data to the target application so that the target application scales the content in the window of the target application based on the window data.
Optionally, in the window processing method according to the present invention, when tab bars of windows of several applications of the above-mentioned one or more applications are drawn by corresponding applications, sizes of the tab bars of the windows thereof are sent to the window manager by the several applications.
According to yet another aspect of the present invention, there is provided a window processing method adapted to be executed in an application of a computing device, the method comprising: detecting that a mouse cursor is positioned in a tab bar area of an application window, and monitoring the triggering operation of a preset key and the sliding operation of a mouse roller; in response to monitoring the operation of sliding the mouse wheel while triggering the preset key, sending a zooming request for zooming the window to a window manager of the computing device, so that the window manager zooms the window based on the zooming request.
Optionally, in the window processing method according to the present invention, the method further includes: and receiving the scaled window data sent by the window manager, and correspondingly scaling the content in the window based on the window data.
According to yet another aspect of the invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the window processing method according to the present invention.
According to still another aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to execute a window processing method according to the present invention.
According to the window processing method, the mouse cursor is detected to be positioned in the tab bar area of the window of the target application, and the triggering operation of the preset key and the sliding operation of the mouse roller are monitored. And in response to the operation that the mouse wheel is slid while the user triggers the preset key is monitored, zooming the window of the target application. Therefore, the title bar area of the application window is used as the function trigger area for window scaling. Obviously, when the user wants to resize the window of an application, the user can do this by moving the mouse cursor into the title bar area of the window, without dragging the mouse to find the edge of the application window. The title bar area of the window is of sufficient width and height to be easier for the user to trigger than the edge of the window. Therefore, the window processing method based on the invention can adjust the size of the applied window more conveniently and quickly, thereby improving the experience of the user.
In addition, the window processing method based on the invention can adjust the size of the application window, and the user can adjust the size of the application window by sliding the roller of the mouse, so that the window processing method is more convenient and further improves the user experience compared with the method of adjusting the size of the application window by repeatedly dragging the mouse. In addition, the window processing method of the invention can be implemented in a window manager, so that the invention can scale the window of any application in the computing device.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a window processing method 200 according to one embodiment of the invention;
FIG. 3 illustrates a schematic diagram of a title bar of a window, according to one embodiment of the invention;
FIG. 4 shows a schematic diagram of content displayed by a screen of a computing device, according to one embodiment of the invention;
FIG. 5 shows a flow diagram of a window processing method 500 according to yet another embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The invention provides a window processing method suitable for being executed in a computing device, which takes a title bar area of an application window as a function trigger area for window scaling, so that a user can adjust the size of the application window more conveniently and quickly.
FIG. 1 shows a block diagram of the physical components (i.e., hardware) of a computing device 100. In a basic configuration, computing device 100 includes at least one processing unit 102 and system memory 104. According to one aspect, the processing unit 102 may be implemented as a processor depending on the configuration and type of computing device. The system memory 104 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, operating system 105 is included in system memory 104, a window manager 150 is running in operating system 105, and a window processing function module is integrated in window manager 150 and is configured to perform window processing method 200 of the present invention.
According to one aspect, the operating system 105 is, for example, adapted to control the operation of the computing device 100. Further, the examples are practiced in conjunction with a graphics library, other operating systems, or any other application program, and are not limited to any particular application or system. This basic configuration is illustrated in fig. 1 by those components within dashed line 108. According to one aspect, the computing device 100 has additional features or functionality. For example, according to one aspect, computing device 100 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in FIG. 1 by removable storage device 109 and non-removable storage device 110.
As stated hereinabove, according to one aspect, program modules are stored in the system memory 104. According to one aspect, the program modules may include one or more applications, the invention not being limited to the type of application, for example, the applications may include: email and contacts applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided applications, web browser applications, and the like.
According to one aspect, examples may be practiced in a circuit comprising discrete electronic elements, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic elements or microprocessors. For example, an example may be practiced via a system on a chip (SOC) in which each or many of the components shown in fig. 1 may be integrated on a single integrated circuit. According to one aspect, such SOC devices may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or "burned") onto a chip substrate as a single integrated circuit. When operating via an SOC, the functions described herein may be operated via application-specific logic integrated with other components of the computing device 100 on a single integrated circuit (chip). Embodiments of the invention may also be practiced using other technologies capable of performing logical operations (e.g., AND, OR, AND NOT), including but NOT limited to mechanical, optical, fluidic, AND quantum technologies. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuits or systems.
According to one aspect, computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, or the like. Output device(s) 114 such as a display, speakers, printer, etc. may also be included. The foregoing devices are examples and other devices may also be used. Computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel, and/or serial ports.
The term computer readable media as used herein includes computer storage media. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, or program modules. System memory 104, removable storage 109, and non-removable storage 110 are all examples of computer storage media (i.e., memory storage). Computer storage media may include Random Access Memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and that can be accessed by the computer device 100. In accordance with one aspect, any such computer storage media may be part of computing device 100. Computer storage media does not include a carrier wave or other propagated data signal.
According to one aspect, communication media is embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism) and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more feature sets or that has been altered in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, Radio Frequency (RF), infrared, and other wireless media.
In one embodiment of the invention, computing device 100 includes one or more processors and one or more readable storage media storing program instructions. The program instructions, when configured to be executed by one or more processors, cause a computing device to perform a window processing method in an embodiment of the invention.
FIG. 2 illustrates a flow diagram of a window processing method 200 according to one embodiment of the invention, the method 200 being suitable for execution in a window manager of a computing device (e.g., the computing device 100 shown in FIG. 1) having one or more applications running therein.
It is to be noted that, the window manager in the computing device is responsible for managing the drawing, position, size, movement, and other operations of the windows of all applications, so that the window manager can clearly know the positions of the windows of the applications running in the computing device.
As shown in FIG. 2, the window processing method 200 of the present invention starts at step S210. In step S210, it is detected that a mouse cursor is located in a tab area of a window of a target application of the one or more applications, and a triggering operation of a predetermined key and a sliding operation of a mouse wheel are monitored.
The title bar is typically at the very top of its window, so the title bar area is typically referred to as the very top area of the application window. Specifically, the title bar area generally contains the application name, file name, and control buttons (e.g., minimize/maximize button, close button, etc.), as shown in FIG. 3. In some embodiments, the title bar area may also include a program icon.
It should be noted that the above description of the title bar is for most applications, and not all. In some embodiments, the title bar may also be located elsewhere in the window. For example, in mechanical drawing, a title field is located in the lower right corner of a window, displaying information related to a drawing.
The title bar of a window of an application can be drawn by the window manager or by the application itself. That is, the title bar of the window may be drawn by the system or by the application itself. It has been pointed out that the window manager is able to know the position of the window of each application, so for each application whose title bar is drawn by the system, the window manager can know the position of the tab bar of its window, whereas for each application whose title bar is drawn, the window manager does not know the position of the tab bar of its window.
However, in order to detect whether the mouse cursor is located in the tab area of a window of an application in real time, the window manager must know the position of the tab of each window.
Based on this, when the tab bar of the window of several applications in the one or more applications is drawn by the corresponding application, the size of the tab bar of the window can be sent to the window manager by the several applications, so that the window manager can clearly know the position of the tab bar of the window of the several applications. Specifically, when there are several applications in the title bar of the free-drawing window in the one or more applications running in the computing device, the height and width of the label bar of the window are sent to the window manager by the several applications at initialization time, so that the window manager can clearly know the position of the title bar of the window of each application running in the computing device.
As an example, there are A, B, C applications running in the computing device, the title bar of the windows for applications a and B being drawn by the system, and the title bar of the window for application C being self-drawn by application C. As can be seen, the title bar of the window of application C in the above three applications is drawn by the application itself, so that the height and width of the title bar of the window of application C need to be sent to the window manager when the application C initializes, and thus the window manager can clearly know A, B, C the positions of the label bars of the windows of the three applications.
After the window manager knows the position of the title bar of the window of each application running in the computing device, the window manager can detect whether the mouse cursor is positioned in the label bar area of the window of one of the applications in real time, and when the window manager detects that the mouse cursor is positioned in the label bar area of the window of one of the applications, the window manager starts to monitor the triggering operation of the preset key and the sliding operation of the mouse wheel.
When the operation of triggering the preset key is monitored, the size of the window to be adjusted by the user is judged, and then the style of the mouse cursor is switched to the preset style so as to prompt the user to enter a preparation state for adjusting the size of the window. Wherein the predetermined pattern may be a double-headed arrow pattern, as shown in fig. 4.
In addition, according to an embodiment of the present invention, when the operation of triggering the predetermined key is monitored, the current scaling of the window may be displayed on the screen of the computing device. Where the current scaling of the window is a percentage of the current size of the window to the size of the window when in the maximized state (i.e., the size of the screen of the computing device). Therefore, when the operation of triggering the preset key is monitored, the current size of the window is acquired firstly, then the current scaling of the window is calculated based on the current size of the window and the size of the window in the maximization state, and finally the current scaling of the window is displayed on the screen of the computing device. Further, the current scaling of the window may be displayed in the form of a floating box in the upper right corner of the screen of the computing device, as in FIG. 4. Of course, this is merely an example, and the present invention is not limited with respect to the display position and manner of the scaling of the window.
Subsequently, if the operation of sliding the mouse wheel is monitored again, in response to the operation of sliding the mouse wheel while monitoring the triggering of the predetermined key, the process proceeds to step S220, and the window of the target application is scaled. The predetermined keys may be roller keys on a mouse or non-input keys on a keyboard. Specifically, when the predetermined button is a scroll wheel button on the mouse, the window is zoomed when the user presses the scroll wheel button on the mouse and also slides the mouse scroll wheel. When the preset key is a non-input key on the keyboard, the window is zoomed when the user presses the non-input key on the keyboard and slides the mouse wheel. As to the non-input keys on the keyboard, in some embodiments, it may be implemented as a ctrl key or a shift key, although this is only an example and the present invention is not limited thereto.
Next, a procedure of scaling the window will be described. First, it is determined whether the sliding mouse wheel operation is an enlargement operation or a reduction operation according to the sliding direction of the mouse wheel. That is, it is determined whether the operation of sliding the mouse wheel is an enlargement operation or a reduction operation, based on the sliding direction of the mouse wheel. If the operation of sliding the mouse wheel is the amplification operation, the window is amplified. If the operation of sliding the mouse wheel is a reduction operation, the window is reduced.
Specifically, in some embodiments, when the sliding direction of the mouse wheel is upward sliding (i.e., when the user slides the mouse wheel upward), it is determined that the operation of sliding the mouse wheel is an operation of enlarging the window, and the window is enlarged. When the sliding direction of the mouse wheel is downward sliding (namely when the user slides the mouse wheel downward), the operation of the sliding mouse wheel is judged to be the operation of reducing the window, and then the window is reduced. Of course, in some other embodiments, the window may be reduced when the user slides the mouse wheel upward, and the window may be enlarged when the user slides the mouse wheel downward, which is not limited in this disclosure.
Further, when the window is enlarged or reduced, the window is enlarged or reduced as the mouse wheel slides. The method comprises the following specific steps:
when the window is enlarged along with the sliding of the mouse wheel, the window is enlarged to a first preset size when the sliding of the mouse wheel is monitored for a preset distance, and the enlargement of the window is stopped in response to the enlargement of the window to a second preset size (namely, the size which can be enlarged to the maximum size of the window and is set by a user).
Specifically, when it is determined that the operation of sliding the mouse wheel is an operation of enlarging the window, the current size of the window is first acquired. Then, it is determined whether the current size of the window is less than a second predetermined size. If the current size of the window is not smaller than the size of the window, the current size of the window reaches the size which can be enlarged to the maximum size of the window and is set by the user, then the window is not processed any more along with the sliding of the mouse wheel, and the process is finished.
And if the current size of the window is smaller than the second preset size, the current size of the window is not enlarged to the size which can be enlarged to the maximum size set by the user, then every time the mouse wheel slides for a preset distance, the current size of the window is added to the first preset size, and the size obtained by adding is compared with the second preset size. If the size obtained by the addition is smaller than the second predetermined size, which indicates that the size of the window after the window is enlarged is still smaller than the size to which the window can be enlarged as set by the user at the maximum, the window is enlarged by the first predetermined size (i.e., the window is enlarged to the size obtained by the addition). If the size obtained by the addition is larger than or equal to the second preset size, the size of the window is equal to or larger than the size which can be enlarged to the maximum size set by the user after the window is enlarged, in order to avoid enlarging the window to exceed the set maximum size, the window is directly enlarged to the second preset size, and the enlargement of the window is stopped.
Similarly, when the window is reduced along with the sliding of the mouse wheel, the window is reduced by the first preset size when the sliding of the mouse wheel is monitored for a preset distance, and the reduction of the window is stopped in response to the reduction of the window to the third preset size (namely, the size to which the window can be reduced to the maximum size set by the user).
Specifically, when it is determined that the operation of sliding the mouse wheel is an operation of reducing the window, the current size of the window is first acquired. Then, it is determined whether the current size of the window is greater than a third predetermined size. If the size of the window is not larger than the size of the window, the current size of the window reaches the size which can be reduced to the maximum size set by the user, then the window is not processed any more with the sliding of the mouse wheel, and the process is finished.
And if the current size of the window is larger than the second preset size, the current size of the window is not reduced to the size which can be reduced to the maximum size set by the user, then every time the mouse wheel slides for a preset distance, the current size of the window is subtracted from the first preset size, and the size obtained by subtraction is compared with the third preset size. If the size obtained by the subtraction is larger than the third predetermined size, which indicates that the size of the window is still larger than the size to which the user can reduce the window to the maximum size after reducing the window, then the window is reduced by the first predetermined size (i.e., the window is reduced to the size obtained by the subtraction). If the size obtained by subtracting is smaller than or equal to the second predetermined size, it indicates that the size of the window is smaller than or equal to the size to which the window can be reduced maximally, which is set by the user.
According to an embodiment of the present invention, when the window is enlarged or reduced, the window may be enlarged or reduced centering on a center point of the window. Specifically, when the window is enlarged, the window is enlarged around the center point of the window. When the window is reduced, the window is reduced to the periphery by taking the central point of the window as the center.
In addition, in the process of enlarging or reducing the window, the scaling of the window displayed on the screen of the computing device can be updated. Specifically, the window scaling is updated once each time the window is enlarged by a first predetermined size. The window scaling is updated each time the window is reduced by the first predetermined size.
The first predetermined size, the second predetermined size, and the third predetermined size will be described below. With respect to the first predetermined size, it may be associated with the current size of the window or the size of the window when in a maximized state. Specifically, the first predetermined size may be 5% of the current size of the window, and thus, each time the mouse is detected to slide by the predetermined distance, the window is enlarged or reduced by 5% around the center point of the window. The first predetermined size may also be 5% of the size of the window when the window is in the maximized state, and thus the window is enlarged or reduced by 5% of the screen size around its center point every time the mouse is monitored to slide a predetermined distance.
With respect to the second predetermined size, it may be associated with the size of the window when in the maximized state. Specifically, the second predetermined size may be a size of the window in a maximized state, and thus, when the window is enlarged, the window can be maximally enlarged to the maximized state. That is, when the window is enlarged to a size at which the window is in a maximized state, the enlargement of the window is stopped. Of course, if the user stops the sliding of the mouse wheel when the window has not been enlarged to the size at which the window is in the maximized state, the enlargement of the window is also stopped.
With respect to the third predetermined size, it may also be associated with the size of the window when in the maximized state. Specifically, the third predetermined size may be 10% of the size of the window in the maximized state, and thus, in the case of reducing the window, the window can be reduced to 10% of the size of the window in the maximized state at the maximum. That is, when the window is reduced to 10% of the size of the window in the maximized state, the reduction of the window is stopped. Also, when the window has not been reduced to 10% of the size of the window in the maximized state, if the user stops the sliding of the mouse wheel, the reduction of the window is also stopped accordingly. Also, in some embodiments, when the user stops triggering the predetermined key, the mouse cursor may be switched from the predetermined style to its default style, such as a single arrow style, and further, the scaling hover box displayed on the screen of the computing device may be hidden. That is, when the user no longer presses the predetermined button for changing the window size, i.e., the mouse wheel button or the non-input button on the keyboard, the mouse cursor is switched from the predetermined style to the default style thereof, and the scaling of the window displayed on the screen is no longer performed.
The above is merely an example of setting the first predetermined size, the second predetermined size, and the third predetermined size, and the present invention is not limited thereto. In the specific embodiment, a person skilled in the art can set the setting according to actual needs. In addition, the predetermined distance in the zooming process of the window is performed once every time the mouse wheel is monitored to slide by the predetermined distance, which is set by the kernel of the operating system based on the operation of sliding the mouse wheel. The method for setting the predetermined distance by the kernel of the operating system based on the operation of the sliding mouse wheel is the prior art, and is not described herein again, but is within the protection scope of the present invention.
At this point, the window manager completes the scaling (i.e., size modification) of the window of the target application as the mouse wheel slides. Then, according to an embodiment of the present invention, the scaled window data may also be sent to the target application, so that the target application scales the content in its window based on the window data. Wherein the window data includes scaled dimensions (e.g., width, height) of the target application window. That is, after the window manager finishes scaling the target application window, the scaled size of the target application window is sent to the target application. Specifically, the window manager may send the scaled window size of the target application to the target application based on a communication protocol such as x11 or wayland.
After receiving the scaled window size, the target application may scale the content in the window based on the scaled window size. Specifically, after the window is enlarged, the target application enlarges the content in the window based on the enlarged window size so that the size of the content in the window matches the size of the enlarged window. Similarly, when the window is reduced, the target application reduces the content in the window based on the reduced window size, so that the size of the content in the window is matched with the size of the reduced window. The invention is not limited with regard to the adaptation ratio of the window size to its content size. In the specific embodiment, the person skilled in the art can set the setting according to the actual needs.
In addition, it is explained here that, when the size of the window of the target application is scaled, if multiple tabs exist in the window of the target application (i.e. multiple tab pages are opened in the target application by the user), the sizes of the multiple tabs in the window should be modified accordingly. Further, the size of the content displayed in the plurality of tabs may also be modified.
In the above embodiment, when the application of the self-drawing title bar is initialized, the position of the tab bar of the window is automatically sent to the window manager, so that the window manager can clearly know the position of the tab bar of each window, thereby implementing the above scaling processing on the window.
The invention also provides an embodiment for the application of the self-drawing title bar, which monitors whether a mouse cursor is positioned in a label bar area of a window of the self-drawing title bar, whether a user triggers a preset key for changing the size of the window and whether the user slides a mouse wheel, and informs a window manager of modifying the size of the window by the application when the mouse cursor is monitored to be positioned in the label bar area of the window and the user triggers the preset key and slides the mouse wheel.
FIG. 5 illustrates a flow diagram of a window processing method 500 according to yet another embodiment of the invention, the method 500 being suitable for execution in an application of a computing device (e.g., the computing device 100 shown in FIG. 1). As shown in fig. 5, the method 500 begins at step S510.
In step S510, it is detected that the mouse cursor is located in the tab area of the window of the application, and the triggering operation of the predetermined key and the sliding operation of the mouse wheel are monitored.
It should be noted that, in the present embodiment, the detection of whether the mouse cursor is located in the tab field area of the window of the application, the triggering operation on the predetermined button, and the monitoring of the sliding operation of the mouse wheel are similar to the detection of whether the mouse cursor is located in the tab field area of the window of the application, the triggering operation on the predetermined button, and the monitoring of the sliding operation of the mouse wheel mentioned in step S210 in the above method 200, and only the execution subject is different (in the present embodiment, the application itself, and in the method 200, the window manager). Therefore, the method for detecting whether the mouse cursor is located in the tab area of the application window, the method for monitoring the triggering operation of the predetermined key and the sliding operation of the mouse wheel in this embodiment are not described herein again, and reference may be made to the above description of step S210 for relevant points.
Then, the process proceeds to step S520, and in response to the operation of sliding the mouse wheel while monitoring the triggering of the predetermined key, a zoom request for zooming the window of the application is sent to the window manager of the computing device, so that the window manager performs zoom processing on the window of the application based on the zoom request.
Wherein, the application can send a scaling request for scaling the window to the window manager based on the system protocol sendmessage. Specifically, the zoom request includes a sliding direction of the mouse wheel, so that the window manager determines whether the operation of the user is an operation of enlarging the window or an operation of reducing the window according to the sliding direction of the mouse wheel. The zoom request also includes a sliding distance of the mouse wheel such that the window manager zooms the window by a corresponding amount based on the sliding distance of the mouse wheel. For the method for the window manager to perform the scaling processing on the window based on the scaling request in this embodiment, it is not repeated here, and it is similar to or the same as the method for performing the scaling processing on the window by responding to the operation of sliding the mouse wheel while monitoring the triggering of the predetermined key in step S220 in the above method 200, and for relevant points, reference may be made to the description of step S220 above.
Therefore, the window manager finishes zooming the application window along with the sliding of the mouse wheel. According to one embodiment of the invention, after the window manager scales the application window, it may also send the scaled window data to the application.
For an application, it then receives the scaled window data sent by the window manager, and scales the content in its window accordingly based on the window data. In this embodiment, the method for scaling the content in the window based on the window data is similar to or the same as the method for scaling the content in the window based on the window data by the target application mentioned in the method 200, and reference may be made to the above detailed description for relevant points, which is not described herein again.
In addition, several points are explained here. First, when the application monitors that the user stops the sliding of the mouse wheel, the application sends a stop request to stop zooming the window to the window manager, so that the window manager stops zooming the application window based on the stop request. Second, when the application detects that the mouse cursor is within the tab field of the application window and the user presses a predetermined key, the application sends a preparation request to the window manager to prepare for scaling the window, such that the window manager switches the mouse cursor to a predetermined style and displays the current scaling of the window on the screen of the computing device based on the preparation request. Finally, when the application detects that the user has stopped pressing the predetermined key, the application sends a cancel request to stop preparing to zoom the window to the window manager, so that the window manager switches the mouse cursor from the predetermined style to its default style based on the cancel request and no longer displays the zoom scale of the window on the screen. For specific details of the window processing method of this embodiment, reference may be made to the description based on fig. 1 to fig. 4, which is not repeated herein.
According to the window processing method, the mouse cursor is detected to be positioned in the tab bar area of the window of the target application, and the triggering operation of the preset key and the sliding operation of the mouse roller are monitored. And in response to the operation that the mouse wheel is slid while the user triggers the preset key is monitored, zooming the window of the target application. Therefore, the title bar area of the application window is used as the function trigger area for window scaling. Obviously, when the user wants to resize the window of an application, the user can do this by moving the mouse cursor into the title bar area of the window, without dragging the mouse to find the edge of the application window. The title bar area of the window is of sufficient width and height to be easier for the user to trigger than the edge of the window. Therefore, the window processing method based on the invention can adjust the size of the applied window more conveniently and quickly, thereby improving the experience of the user.
Furthermore, the size of the application window is adjusted based on the window processing method, a user can adjust the size of the application window by sliding the roller of the mouse, and compared with the method of adjusting the size of the window by repeatedly dragging the mouse, the method is more convenient and further improves the user experience. Moreover, the window processing method of the present invention can be implemented in a window manager, so that the present invention can scale a window of any application in a computing device.
In addition, after the window is zoomed, the window processing method can also zoom the content displayed in the window correspondingly, so that the size of the content displayed in the window can be matched with the stool and the urine of the window in real time.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the window processing method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
It should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the means for performing the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (12)

1. A window processing method adapted to be executed in a window manager of a computing device having one or more applications running therein, the method comprising:
detecting that a mouse cursor is positioned in a tab bar area of a window of a target application in the one or more applications, and monitoring the triggering operation of a preset key and the sliding operation of a mouse roller;
and performing zooming processing on the window in response to the operation of sliding a mouse wheel while monitoring the triggering of the preset key.
2. The method of claim 1, wherein the scaling the window comprises:
determining the operation of sliding the mouse wheel to be an amplifying operation or a reducing operation according to the sliding direction of the mouse wheel;
if the operation of sliding the mouse wheel is an amplifying operation, amplifying the window;
and if the operation of sliding the mouse wheel is a reduction operation, reducing the window.
3. The method of claim 2, wherein the step of magnifying the window comprises:
when the mouse roller slides for a preset distance, the window is enlarged by a first preset size;
in response to the window enlarging to a second predetermined size, stopping enlarging the window.
4. A method as claimed in claim 2 or 3, wherein the step of reducing the window comprises:
when the mouse roller slides for a preset distance, reducing the window by a first preset size;
stopping the zooming out of the window in response to the window zooming out to a third predetermined size.
5. The method of claim 3 or 4, wherein the first predetermined size is associated with a current size of the window or a size of the window when in a maximized state, and the second and third predetermined sizes are associated with a size of the window when in a maximized state.
6. The method of any of claims 1-5, further comprising:
and when the operation of triggering a preset key is monitored, switching the mode of the mouse cursor to a preset mode, and displaying the current scaling of the window on the screen of the computing equipment.
7. The method of any of claims 1-6, further comprising:
and sending the scaled window data to the target application so that the target application correspondingly scales the content in the window of the target application based on the window data.
8. The method of any of claims 1-7, wherein when tab bars of windows of several of the one or more applications are drawn by the corresponding applications, the size of the tab bars of their windows is sent by the several applications to the window manager.
9. A window processing method adapted to be executed in an application of a computing device, the method comprising:
detecting that a mouse cursor is positioned in a tab bar area of the window of the application, and monitoring the triggering operation of a preset key and the sliding operation of a mouse roller;
and in response to the operation of sliding a mouse wheel while monitoring that the preset key is triggered, sending a zooming request for zooming the window to a window manager of the computing equipment, so that the window manager zooms the window based on the zooming request.
10. The method of claim 9, further comprising:
and receiving the scaled window data sent by the window manager, and correspondingly scaling the content in the window based on the window data.
11. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-10.
12. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-10.
CN202210556556.3A 2022-05-17 2022-05-17 Window processing method, computing device and readable storage medium Pending CN114968004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210556556.3A CN114968004A (en) 2022-05-17 2022-05-17 Window processing method, computing device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210556556.3A CN114968004A (en) 2022-05-17 2022-05-17 Window processing method, computing device and readable storage medium

Publications (1)

Publication Number Publication Date
CN114968004A true CN114968004A (en) 2022-08-30

Family

ID=82985017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210556556.3A Pending CN114968004A (en) 2022-05-17 2022-05-17 Window processing method, computing device and readable storage medium

Country Status (1)

Country Link
CN (1) CN114968004A (en)

Similar Documents

Publication Publication Date Title
US11487426B2 (en) Apparatus and method for cursor control and text selection and editing based on gesture-based touch inputs received in a virtual keyboard display area
JP3374378B2 (en) Method and computer system for automatically resizing windows
KR101345500B1 (en) Method and system for context dependent pop-up menus
US6323884B1 (en) Assisting user selection of graphical user interface elements
US8875047B2 (en) Smart docking for windowing systems
US9152529B2 (en) Systems and methods for dynamically altering a user interface based on user interface actions
US5553225A (en) Method and apparatus for combining a zoom function in scroll bar sliders
JP4173718B2 (en) Window switching device and window switching program
US20110219331A1 (en) Window resize on remote desktops
US20120212438A1 (en) Methods and apparatuses for facilitating interaction with touch screen apparatuses
CN107193438B (en) Method for managing desktop icons and mobile terminal
CN110286840B (en) Gesture zooming control method and device of touch equipment and related equipment
US20120054667A1 (en) Separate and simultaneous control of windows in windowing systems
CN114510176B (en) Desktop management method of terminal equipment and terminal equipment
US20150378545A1 (en) One touch scroll and select for a touch screen device
US20210312676A1 (en) Multi-graph display method and computer-readable storage medium
WO2013019877A1 (en) Systems and methods for automatically switching on and off a "scroll-on output" mode
WO2013180687A1 (en) Translation of touch input into local input based on a translation profile for an application
WO2023045927A1 (en) Object moving method and electronic device
CN111190677A (en) Information display method, information display device and terminal equipment
CN114415886A (en) Application icon management method and electronic equipment
US9720566B1 (en) Management of user interface elements
CN113268182A (en) Application icon management method and electronic equipment
CN114968004A (en) Window processing method, computing device and readable storage medium
CN112905075B (en) Page display method, device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination