diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-18 09:57:19 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-18 09:57:19 -0500 |
| commit | 1f08c874e0c9df9019e994098e1d006a7011e533 (patch) | |
| tree | 7d19b3d64b35e4746d1816b81d0f05e1aadf0f34 /stdwndclass_windows.go | |
| parent | 16ab1763ba7468314972b962440ff80dad2997f5 (diff) | |
Made event dispatch asynchronous to avoid deadlocks; right now events that cannot be dispatched get dropped.
Diffstat (limited to 'stdwndclass_windows.go')
| -rw-r--r-- | stdwndclass_windows.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go index 2824746..3c9861f 100644 --- a/stdwndclass_windows.go +++ b/stdwndclass_windows.go @@ -32,7 +32,7 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam switch ss.ctype { case c_button: if wParam.HIWORD() == _BN_CLICKED { - ss.event <- struct{}{} + ss.signal() } } return 0 @@ -58,9 +58,7 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam } return 0 case _WM_CLOSE: - if s.event != nil { - s.event <- struct{}{} - } + s.signal() return 0 default: r1, _, _ := defWindowProc.Call( |
