diff options
| author | Pietro Gagliardi <[email protected]> | 2014-05-23 17:11:59 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-05-23 17:11:59 -0400 |
| commit | b359f995f5b1079ad382cf073b0359b6dbfee79e (patch) | |
| tree | b95fbd6ef86d2d9720f290303564986f19af3d8c /area_windows.go | |
| parent | 582e3b4644c25c273e790bc646fd5a28c3a9a85c (diff) | |
Added click counter reset on window activate/deactivate for Windows Areas.
Diffstat (limited to 'area_windows.go')
| -rw-r--r-- | area_windows.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/area_windows.go b/area_windows.go index 4270046..943c5af 100644 --- a/area_windows.go +++ b/area_windows.go @@ -644,7 +644,14 @@ func areaWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lPara return 0 } return defwndproc() + case _WM_ACTIVATE: + // don't keep the double-click timer running if the user switched programs in between clicks + s.clickCounter.reset() + // MSDN says this message will be sent alongside WM_MOUSEACTIVATE, but we'll reset there too, just in case + return 0 case _WM_MOUSEACTIVATE: + // don't keep the double-click timer running if the user switched programs in between clicks + s.clickCounter.reset() // transfer keyboard focus to our Area on an activating click // (see http://www.catch22.net/tuts/custom-controls) r1, _, err := _setFocus.Call(uintptr(s.hwnd)) |
