summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-12 21:33:24 -0500
committerPietro Gagliardi <[email protected]>2014-02-12 21:33:24 -0500
commit3d2df2334e13954c166d46013609856113db4d97 (patch)
tree9cca792aec2040ac24725cad9c7a255f8961a390 /stdwndclass_windows.go
parent8e2f3b136e041705098f9f8d11941c33f785258a (diff)
Fixed compiler errors. New code structure success!
Diffstat (limited to 'stdwndclass_windows.go')
-rw-r--r--stdwndclass_windows.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index ad99ce4..b87743f 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -27,12 +27,12 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam
case _WM_COMMAND:
id := _HMENU(wParam.LOWORD())
s.childrenLock.Lock()
- defer s.childrenLock.Unlock()
- ss = s.children[id]
+ ss := s.children[id]
+ s.childrenLock.Unlock()
switch ss.ctype {
case c_button:
if wParam.HIWORD() == _BN_CLICKED {
- sysData.event <- struct{}{}
+ ss.event <- struct{}{}
}
}
return 0