CN103116441B - A kind of windows switching method and device - Google Patents
A kind of windows switching method and device Download PDFInfo
- Publication number
- CN103116441B CN103116441B CN201310032774.8A CN201310032774A CN103116441B CN 103116441 B CN103116441 B CN 103116441B CN 201310032774 A CN201310032774 A CN 201310032774A CN 103116441 B CN103116441 B CN 103116441B
- Authority
- CN
- China
- Prior art keywords
- window
- pointer
- list
- windows
- windows exchange
- 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.)
- Expired - Fee Related
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of windows switching method, put whether front window meets default switching condition including: real-time judge current system, if met, its window pointer being added in window data chained list;The windows exchange request of the user of record in circulation reading the first list, often reads a windows exchange request, then obtain the last window pointer putting front window from described window data chained list;If the window pointer that the last time obtained puts front window is effective, then this window pointer is added in the second list;The window pointer in described second list is read in circulation, before being put by corresponding window.Additionally, also disclose a kind of windows exchange device.The recordable nearest focus window of the present invention, the method adopting poll, it is possible to separate inquiry thread and response thread carries out background program switch window.Decrease the impact on windows exchange of other system program, improve the real-time of windows exchange, the success rate of windows exchange can be greatly improved simultaneously.
Description
Technical field
The present invention relates to multi-window operation technical field, particularly relate to a kind of windows switching method and a kind of windows exchange device.
Background technology
At present, the method realizing application window switching mainly has following two: one is to perform alt+tab(alt key combination tab key by keyboard under Windows to use) recall current window list according to system process list, thus realizing carrying out windows exchange, but this need to rely on keyboard operation, this operation can not be performed when there is no keyboard.The second is to use process simulation keyboard operation to send simulating keyboard message to system to realize keyboard shift, the unsuccessful situation of switch window but easily occurs, before to be switched target window is not set to after performing switch window order.It is subject to the impact of the window of other program of system simultaneously during operation, causes the problems such as internal system window such as cannot being switched to system input method.Being also possible to stop the impact of the process blocking of response because of operating system, handoff procedure postpones for a long time, affects Consumer's Experience.Therefore, strengthen windows exchange real-time, improve windows exchange success rate and become a problem in the urgent need to address.
Summary of the invention
Based on this, the invention provides a kind of windows switching method and a kind of windows exchange device.
A kind of windows switching method, comprises the following steps:
Real-time judge current system put whether front window meets default switching condition, if met, its window pointer is added in window data chained list;
The windows exchange request of the user of record in circulation reading the first list, often reads a windows exchange request, then obtain the last window pointer putting front window from described window data chained list;
If the window pointer that the last time obtained puts front window is effective, then this window pointer is added in the second list;
The window pointer in described second list is read in circulation, before being put by corresponding window.
Compared with general technology, the recordable nearest focus window of windows switching method of the present invention, the method adopting poll, it is possible to separate inquiry thread and response thread carries out background program switch window.Decrease the impact on windows exchange of other system program, improve the real-time of windows exchange, the success rate of windows exchange can be greatly improved simultaneously.
A kind of windows exchange device, including window logging modle, poller module and respond module;
For real-time judge current system, described window logging modle, puts whether front window meets default switching condition, if met, be added in window data chained list by its window pointer;
Described poller module, for circulating the windows exchange request of the user of record in reading the first list, often reads a windows exchange request, then obtains the last window pointer putting front window from described window data chained list;
If the window pointer that the last time obtained puts front window is effective, then this window pointer is added in the second list by described poller module;
Described respond module, for circulating the window pointer read in described second list, before being put by corresponding window.
Compared with general technology, the recordable nearest focus window of windows exchange device of the present invention, the method adopting poll, it is possible to separate inquiry thread and response thread carries out background program switch window.Decrease the impact on windows exchange of other system program, improve the real-time of windows exchange, the success rate of windows exchange can be greatly improved simultaneously.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of windows switching method of the present invention;
Fig. 2 is the fundamental diagram of the preferred embodiment applying windows switching method of the present invention;
Fig. 3 is the structural representation of windows exchange device of the present invention.
Detailed description of the invention
For further setting forth the effect of technological means that the present invention takes and acquirement, below in conjunction with accompanying drawing and preferred embodiment, to technical scheme, carry out clear and complete description.
Refer to Fig. 1, for the schematic flow sheet of windows switching method of the present invention.Windows switching method of the present invention, comprises the following steps:
S101 real-time judge current system put whether front window meets default switching condition, if met, its window pointer is added in window data chained list;
As one of them embodiment, with preset time period for the cycle, circulation obtains the window handle putting front window of current system;Described window handle according to obtaining judges whether this window meets default switching condition.
As one of them embodiment, described preset time period is 20 milliseconds.
Window record part when system is run, take and avoid mistakes and omissions window record reducing system resource as far as possible, by judging between optimal time T0, use thread to press T0 and inquire about current system theactivewindow, judging after getting window handle whether this window meets switch window condition F0, window pointer is updated in window data chained list by qualified window.
The time of T0 presses value and calculates:
The ghost phenomena of human eye, surpasses 24 frames/second human eye to display image change and can not be identified, therefore T0 < (1/24) second;
The click speed of keyboard or mouse is general only to 300 beats/min, and as keyboard combination key (alt+tab) can only reach about 100/ minute, < (1/24) second can meet the windows exchange that user is operated by keyboard and mouse to T0;
Carry out more fast to the operation of window query, then system needs the more time to process query manipulation, and the efficiency that namely the more slow then overall system of the thread cycle of window record runs is more high.
Therefore, the cycle of (1/24) can be accelerated 2 times, use 1/50 second namely 20 milliseconds to use to meet system.
Condition F0 presses conditional filtering:
Whether oneself is chained list top-level windows to current window, is do not process;
Current window whether system desktop subwindow or menu or information window, be do not process;
Current window meets the eliminating window that user independently screens, as respond module generate window W, be do not process.
In S102 circulation reading the first list, the windows exchange request of the user of record, often reads a windows exchange request, then obtain the last window pointer putting front window from described window data chained list;
Shared lock Lock worker thread poll can be used to process, if lock Lock is lock-out state, then only record user's switch window asks the first list List1.
It is unlocking condition as locked Lock, the first list List1 that thread reads the switch window request of record user by T0 speed loop can be started, read request, then take out from window data chained list and put front theactivewindow pointer P last time.
If the window pointer that the last time that S103 obtains puts front window is effective, then this window pointer is added in the second list;
As one of them embodiment, if the last time obtained puts the window pointer non-NULL of front window, window attribute is not hidden state, and window size is not zero, then judge that this window pointer is effective, add it in the second list.
As one of them embodiment, after obtaining the window pointer that the last time puts front window from window data chained list, if the window pointer that the last time obtained puts front window is invalid, then from described window data chained list, delete this window pointer.
F1 as effective in pointer P then pointer is sent to treats that respond module is waited to put front theactivewindow list, i.e. the second list List2, and lock Lock is locked, otherwise from window data chain statistical form except this window pointer, take forward the activation pointer of last time by window data chained list successively and process.
The condition of window effectiveness F1 can be: window pointer P non-NULL, window still suffers from;Window attribute is not hidden state;Window size is not 0.
The window pointer in described second list is read in S104 circulation, before being put by corresponding window.
Outside the visible viewing area of user, generate a window W being sized to 1*1, assistant window during as theactivewindow during initialization, and be set to hidden state.Separately starting thread during initialization to read by T0 speed loop and wait to put front theactivewindow list, i.e. the second list List2, if Lock state is for unblanking, program performs operation P before window is put after reading request, after completing, lock Lock is set to unlocking condition.
Before window is put, operation P has 3 parts:
Use system API arranges before window puts;
Such as above-mentioned 1 setup failed, then first arrange before window W puts, then perform to put front activation manipulation by front window system API to be put;
If front window to be put is without response, then before respond module waits that this window cannot be put after 1 second, then the request of this switching action is abandoned, wait handover request next time.
Preferably, can increasing a key device on PC, button performs handover operation after being activated by a user, and puts before front theactivewindow puts by last time after each click keys.Response time was less than 0.1 second.
Preferably, a service receiving changeover program can be received on PC, receive the switching message of switching message that network is sent to or other process of user, then perform windows exchange and operate.
Refer to Fig. 2, for applying the fundamental diagram of a preferred embodiment of windows switching method of the present invention.Each module call relation is as shown in the drawing.
Compared with general technology, the recordable nearest focus window of windows switching method of the present invention, the method adopting poll, it is possible to separate inquiry thread and response thread carries out background program switch window.Decrease the impact on windows exchange of other system program, improve the real-time of windows exchange, the success rate of windows exchange can be greatly improved simultaneously.
The present invention carries out background program switch window by recording nearest focus window, thus being greatly improved the switching rate of window valid window, and can be prevented effectively from the problem being switched to system windows and the desired window of non-user.
Rely on chained list and judge whether to meet the window of switching condition, improve the switching rate of valid window.Using independent processing module to perform user's handover request and response request, respond module time-out does not affect the handover request of poller module record user.An assistant window is used to improve the success rate putting front theactivewindow.
Refer to Fig. 3, for the structural representation of windows exchange device of the present invention.Windows exchange device of the present invention, including window logging modle 301, poller module 302 and respond module 303;
For real-time judge current system, described window logging modle 301, puts whether front window meets default switching condition, if met, be added in window data chained list by its window pointer;
As one of them embodiment, described window logging modle 301 is with preset time period for the cycle, and circulation obtains the window handle putting front window of current system;And judge whether this window meets default switching condition according to the described window handle obtained.
As one of them embodiment, described preset time period is 20 milliseconds.
Window logging modle: window record part when system is run, take and avoid mistakes and omissions window record reducing system resource as far as possible, by judging between optimal time T0, use thread to press T0 and inquire about current system theactivewindow, judging after getting window handle whether this window meets switch window condition F0, window pointer is updated in window data chained list by qualified window.
Described poller module 302, for circulating the windows exchange request of the user of record in reading the first list, often reads a windows exchange request, then obtains the last window pointer putting front window from described window data chained list;
Poller module uses shared lock Lock worker thread poll to process, if lock Lock is lock-out state, then poller module only records user's switch window and asks list List1, it is unlocking condition as locked Lock, poller module starts thread and presses the list List1 that T0 speed loop reads the switch window request of record user after initializing, read request, then take out from window data chained list and put front theactivewindow pointer P last time, F1 as effective in pointer P then pointer is sent to treats that respond module is waited to put front theactivewindow list List2, and lock Lock is locked, otherwise from window data chain statistical form except this window pointer, take forward the activation pointer of last time by window data chained list successively to process.
If the window pointer that the last time obtained puts front window is effective, then this window pointer is added in the second list by described poller module 302;
As one of them embodiment, if the window pointer that the last time obtained puts front window is invalid, then described poller module 302 deletes this window pointer from described window data chained list.
As one of them embodiment, if the last time obtained puts the window pointer non-NULL of front window, window attribute is not hidden state, and window size is not zero, then described poller module 302 judges that this window pointer is effective, adds it in the second list.
Described respond module 303, for circulating the window pointer read in described second list, before being put by corresponding window.
Outside the visible viewing area of user, generate a window W being sized to 1*1, assistant window during as theactivewindow when respond module initializes, and be set to hidden state.Respond module separately starts thread when initializing and reads by T0 speed loop and wait to put front theactivewindow list List2, and if Lock state is for unblanking, program performs after reading request to operate P before window is put, and after completing, lock Lock is set to unlocking condition.
Before window is put, operation P has 3 parts:
Use system API arranges before window puts;
Such as above-mentioned 1 setup failed, then first arrange before window W puts, then perform to put front activation manipulation by front window system API to be put;
If front window to be put is without response, then before respond module waits that this window cannot be put after 1 second, then the request of this switching action is abandoned, wait handover request next time.
The present invention is made up of 3 parts, window logging modle, poller module and respond module.Wherein window logging modle record is when preposition front window is to window data chained list, by poller module query calls, when poller module receives switching command, it is determined that after to be switched window, sends messages to respond module and realizes windows exchange.
Compared with general technology, the recordable nearest focus window of windows exchange device of the present invention, the method adopting poll, it is possible to separate inquiry thread and response thread carries out background program switch window.Decrease the impact on windows exchange of other system program, improve the real-time of windows exchange, the success rate of windows exchange can be greatly improved simultaneously.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that, for the person of ordinary skill of the art, without departing from the inventive concept of the premise, it is also possible to making some deformation and improvement, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.
Claims (10)
1. a windows switching method, it is characterised in that comprise the following steps:
Real-time judge current system put whether front window meets default switching condition, if met, its window pointer is added in window data chained list;
The windows exchange request of the user of record in circulation reading the first list, often reads a windows exchange request, then obtain the last window pointer putting front window from described window data chained list;
If the window pointer that the last time obtained puts front window is effective, then this window pointer is added in the second list;
The window pointer in described second list is read in circulation, before being put by corresponding window.
2. windows switching method according to claim 1, it is characterised in that described real-time judge current system put whether front window meets the step of default switching condition, comprise the following steps:
With preset time period for the cycle, circulation obtains the window handle putting front window of current system;
Described window handle according to obtaining judges whether this window meets default switching condition.
3. windows switching method according to claim 2, it is characterised in that described preset time period is 20 milliseconds.
4. windows switching method according to claim 1, it is characterised in that after the last step of window pointer putting front window of acquisition, comprise the following steps from window data chained list described:
If the window pointer that the last time obtained puts front window is invalid, then from described window data chained list, delete this window pointer.
5. windows switching method according to claim 1, it is characterised in that if the window pointer that the last time of described acquisition puts front window is effective, then this window pointer is added into the step in the second list, comprises the following steps:
If the last time obtained puts the window pointer non-NULL of front window, window attribute is not hidden state, and window size is not zero, then judge that this window pointer is effective, add it in the second list.
6. a windows exchange device, it is characterised in that include window logging modle, poller module and respond module;
For real-time judge current system, described window logging modle, puts whether front window meets default switching condition, if met, be added in window data chained list by its window pointer;
Described poller module, for circulating the windows exchange request of the user of record in reading the first list, often reads a windows exchange request, then obtains the last window pointer putting front window from described window data chained list;
If the window pointer that the last time obtained puts front window is effective, then this window pointer is added in the second list by described poller module;
Described respond module, for circulating the window pointer read in described second list, before being put by corresponding window.
7. windows exchange device according to claim 6, it is characterised in that described window logging modle is with preset time period for the cycle, and circulation obtains the window handle putting front window of current system;And judge whether this window meets default switching condition according to the described window handle obtained.
8. windows exchange device according to claim 7, it is characterised in that described preset time period is 20 milliseconds.
9. windows exchange device according to claim 6, it is characterised in that if the window pointer that the last time obtained puts front window is invalid, then described poller module deletes this window pointer from described window data chained list.
10. windows exchange device according to claim 6, it is characterized in that, if the last time obtained puts the window pointer non-NULL of front window, window attribute is not hidden state, and window size is not zero, then described poller module judges that this window pointer is effective, adds it in the second list.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310032774.8A CN103116441B (en) | 2013-01-28 | 2013-01-28 | A kind of windows switching method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310032774.8A CN103116441B (en) | 2013-01-28 | 2013-01-28 | A kind of windows switching method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103116441A CN103116441A (en) | 2013-05-22 |
CN103116441B true CN103116441B (en) | 2016-06-29 |
Family
ID=48414836
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310032774.8A Expired - Fee Related CN103116441B (en) | 2013-01-28 | 2013-01-28 | A kind of windows switching method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103116441B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105224167B (en) * | 2015-08-31 | 2018-07-06 | 深圳市茁壮网络股份有限公司 | A kind of windows switching method and device |
CN108008929B (en) * | 2017-12-19 | 2021-07-27 | 重庆满惠网络科技有限公司 | Method and system for establishing split-screen PC (personal computer) webpage browser |
CN112379808B (en) * | 2020-12-01 | 2023-08-22 | 腾讯科技(深圳)有限公司 | Window control method, device, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101184300A (en) * | 2007-12-06 | 2008-05-21 | 中兴通讯股份有限公司 | Window management method in mobile phone graphic system |
CN101504607A (en) * | 2009-03-20 | 2009-08-12 | 华亚微电子(上海)有限公司 | Window state manager and method, window management system and method |
CN102063302A (en) * | 2010-12-20 | 2011-05-18 | 北京握奇数据系统有限公司 | Window management method, system and terminal |
CN102375668A (en) * | 2010-08-25 | 2012-03-14 | 中兴通讯股份有限公司 | Window management method and device for mobile terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7450084B2 (en) * | 2004-12-17 | 2008-11-11 | Microsoft Corporation | System and method for managing computer monitor configurations |
-
2013
- 2013-01-28 CN CN201310032774.8A patent/CN103116441B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101184300A (en) * | 2007-12-06 | 2008-05-21 | 中兴通讯股份有限公司 | Window management method in mobile phone graphic system |
CN101504607A (en) * | 2009-03-20 | 2009-08-12 | 华亚微电子(上海)有限公司 | Window state manager and method, window management system and method |
CN102375668A (en) * | 2010-08-25 | 2012-03-14 | 中兴通讯股份有限公司 | Window management method and device for mobile terminal |
CN102063302A (en) * | 2010-12-20 | 2011-05-18 | 北京握奇数据系统有限公司 | Window management method, system and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN103116441A (en) | 2013-05-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220070304A1 (en) | Information Reminding Method and Apparatus, and Electronic Terminal | |
WO2020238815A1 (en) | Display control method and device, electronic device and storage medium | |
WO2022089330A1 (en) | Method for taking screenshot, apparatus, electronic device, and readable storage medium | |
WO2015184770A1 (en) | Information processing method, system and terminal | |
TW201416906A (en) | Mobile communications device, non-transitory computer-readable medium and method of switching screen of mobile communications device from screen locked state to screen unlocked state | |
CN102929550B (en) | A kind of take pictures delet method and mobile terminal based on mobile terminal | |
CN104349109A (en) | Information processing method and electronic equipment | |
CN102801649A (en) | Method and terminal for establishing shortcut of instant messaging interactive interface | |
WO2022156766A1 (en) | Picture-photographing method and apparatus, and electronic device | |
CN103116441B (en) | A kind of windows switching method and device | |
WO2018086454A1 (en) | Page data processing method and device | |
US20160070421A1 (en) | Information Processing Method And Electronic Apparatus | |
CN104657053A (en) | Method for realizing particular functions by multi-point gestures at touch screen terminal | |
CN106774796A (en) | A kind of screen lighting method and terminal | |
TWI719323B (en) | Method and apparatus for switching a view, and computing device | |
WO2023082613A1 (en) | Layer display method and apparatus | |
CN110333919A (en) | A kind of method and apparatus that social object information is presented | |
WO2016201803A1 (en) | Method and device for controlling display of screen projection, and mobile terminal | |
CA2961273C (en) | Method for presentation by terminal device, and terminal device | |
CN102681780A (en) | Intelligent Linux device and input method switching method for same | |
WO2024131821A1 (en) | Photographing method and apparatus and electronic device | |
CN105468237A (en) | Screen-shot method in video call and electronic equipment | |
CN112383708B (en) | Shooting method and device, electronic equipment and readable storage medium | |
JP2019533861A (en) | Virtual navigation bar processing method and terminal | |
JP2013197998A (en) | Server terminal, screen transfer system, and screen transfer method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 510670 Guangdong Province, Guangzhou high tech Industrial Development Zone Kezhu Road No. 233 Patentee after: VTRON GROUP Co.,Ltd. Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No. Patentee before: VTRON TECHNOLOGIES Ltd. |
|
CP03 | Change of name, title or address | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160629 Termination date: 20220128 |
|
CF01 | Termination of patent right due to non-payment of annual fee |