diff options
| author | Pietro Gagliardi <[email protected]> | 2014-05-25 14:34:19 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-05-25 14:34:19 -0400 |
| commit | e7327f237867157955657a781be148a559f4bd52 (patch) | |
| tree | d48f213a5c31dad2b88fcbccf1efc587c98aded1 | |
| parent | d6e7eda29c9c4c774b1b8210ab5d9da0bc51fdfa (diff) | |
Fixed Areas on Windows no longer obeying click count rules after adding the WM_ACTIVATE handler.
| -rw-r--r-- | area_windows.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/area_windows.go b/area_windows.go index 5d62291..5664ffa 100644 --- a/area_windows.go +++ b/area_windows.go @@ -626,11 +626,9 @@ func areaWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lPara 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() + // this happens on every mouse click (apparently), so DON'T reset the click counter, otherwise it will always be reset (not an issue, as MSDN says WM_ACTIVATE is sent alongside WM_MOUSEACTIVATE when necessary) // 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)) |
