-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevlog.txt
182 lines (133 loc) · 5.75 KB
/
devlog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
2015-12-29 11:19:09
http://www.thescarms.com/VBasic/alttab.aspx
跟着这里的教程来重现 alt-tab 里的窗口们
2015-12-29 13:52:24
alt down
tab down
-> show switcher
tab down
tab down
... (loop through windows)
tab down
tab up
alt up
-> hide switcher
2015-12-29 16:00:25
http://www.qtcentre.org/threads/22197-Bring-application-window-to-front
widget.setWindowFlags(Qt.WindowStaysOnTopHint)
可以保证 swif 出现时总在最上层
2015-12-29 16:50:48
http://www.codeproject.com/Tips/76427/How-to-bring-window-to-top-with-SetForegroundWindo
第二种方法试了不好用,第一种模拟MENU键的办法works like a charm~~
不过要小心一定别漏了KEYUP,否则整个电脑键盘操作全要乱套
2015-12-29 23:45:35
目前还是有bug,经常会残留 LMENU down 的状态导致应用程序从此输入紊乱
需要再仔细研究下 keybd_event 或者找个更好的绕过 SetForegroundWindow 限制的机制
2015-12-30 08:38:06
修了修代码,貌似LMENU残留的问题又解决了——但是不知道why & how,所以还是去仔细研究研究
2015-12-30 15:37:46
看上去像是 LMENU down 被放进 system message queue 后,别的window都会取到,完了就给人mess up了
(写了两个程序复现了一下,但是比较乱,,先试试看windows hook能不能搞明白)
2015-12-30 21:49:50
搞不定,好挫败~~ 先不弄了,需求也不强烈
2017-05-25 18:40:31
同一个进程如果有两个窗口(比如python带控制台的GUI),SwitchToThisWindow会不太对,得研究一下
2017-05-25 18:47:00
目前要有的操作:
tab down when alt downing
make switcher visible, switch to next thumbnail
tab down when alt & shift downing
make switcher visible, switch to prev thumbnail
alt up
when switcher visible: switch to current thumbnail, hide switcher
key down when alt downing
switch to specified window, hide switcher
if no match then nop
2017-05-26 09:15:21
https://blogs.msdn.microsoft.com/oldnewthing/20111026-00/?p=9263
监测hwnd关闭
2017-05-26 17:09:45
https://stackoverflow.com/questions/6312627/windows-7-how-to-bring-a-window-to-the-front-no-matter-what-other-window-has-fo
2017-05-26 21:30:27
https://blogs.msdn.microsoft.com/oldnewthing/20090226-00/?p=19013/
折腾了一天,最终还是暂选 RegisterHotKey 的方式吧(ctrl-alt-1也确实是想用的方式)
2017-05-28 01:20:28
. A robust and easy for use window manager.
If some window is switched by a key, it will tend to remained there in
the panel inorder to easily switch to it using that same key later.
Windows not in switch history will flow during open/close actions.
For example, initial 4 windows, all without switch history:
*a(1) b(2) c(3) d(4)
(Format `<wnd>(<hotkey>)`, `*` for current window)
User switch to `b`
a(1) *[b(2)] c(3) d(4)
(`[..]` for historically switched window)
Switch to and close `a`
c(1) *[b(2)] d(3)
Switch to `d`
c(1) [b(2)] *[d(3)]
Open a new window `e`
c(1) [b(2)] [d(3)] *e(4)
Note there will be holes if user close a middle window while all
windows are in history. But that's fine because holes will quickly be
filled by new opened windows.
2017-05-28 20:05:30
. Trim window title by pixel width, not char length
2017-05-28 22:53:51
. Ctrl-Alt-[1-9] for non first 8 windows
2017-05-29 07:42:28
bug fix
. when UIOP line has no window, marker go to top of the screen
solution: let dummy window rc_thumb = rc_item
. too big 'Availble' font size
solution: min(rc_item.height() * 0.25, 30)
2017-05-31 03:12:10
. windows 10, after task manager open/close, can not activate anymore
solution: run as administrator
. thumb flash between frameless & framed
solution:
thumbprop.fSourceClientAreaOnly = 0
dwmapi.DwmUpdateThumbnailProperties(
self.thumbnail, ctypes.byref(thumbprop))
2017-05-31 09:14:33
https://mail.python.org/pipermail/python-win32/2005-February/002943.html
extract icon
2017-05-31 17:33:34
https://evilcodecave.wordpress.com/2009/08/03/qt-undocumented-from-hicon-to-qpixmap/
hicon 2 QPixmap
https://github.com/nickcano/workstations/blob/master/QPixmapIcon.cpp
qt_fromWinHBITMAP
(qt5有直接的hicon2pixmap,但是要python3,以后转吧)
2017-06-01 13:56:09
bug fix
.!! on company's thinkpad t460, get exe path failed (potplayer, explorer)
solution: use windll.kernel32.QueryFullProcessImageNameW
.! after sleep/resume, will show non-taskbar windows
such as 'Store', 'Photos', '设置'
solution: blacklist...
todo
. when no activate window, ctrl-d/f should go to e.g. 1st window.
ease use for one hand.
.!!! add program icon
2017-06-09 18:26:56
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/f6032ca1-31b8-4ad5-be39-f78dd29952da/hooking-problem-in-windows-7?forum=windowscompatibility
用一段时间hook就掉的bug真的超级烦,——很难debug
现在直接暴力每5秒重新hook一次看看怎么样
以后有空再去搞这里说的Raw Input吧
2017-06-10 08:46:52
hook还是会失效,决定尝试raw input了
https://stackoverflow.com/questions/5249903/receiving-wm-copydata-in-python
pywin32 window proc | PumpMessages
http://www.toymaker.info/Games/html/raw_input.html
register keyboard (constants)
https://stackoverflow.com/questions/10652713/wm-input-is-defective
用raw input替换掉了hook
然而发现发来的VKey不分左右(Ctrl/Alt/Shift)——即不像hook那样发的是LMenu而是Menu
这里有解决办法
2017-06-10 10:43:25
搞定
2017-06-10 11:39:25
发现还是有问题... 之前区分LMENU和RMENU的代码完全错了
2017-06-10 11:59:12
https://stackoverflow.com/a/18340130
搞定