summaryrefslogtreecommitdiff
path: root/sysdata_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-11 19:43:07 -0500
committerPietro Gagliardi <[email protected]>2014-02-11 19:43:07 -0500
commit9bfe67c49d6580bf977403fecf4d345db7524747 (patch)
treed480691c15083ced8d27cf79edd49f96a9f76f48 /sysdata_windows.go
parentbc531d60d703e0113973a965450383049b930b73 (diff)
Changed the caching such that the window procedure is held until we added the HWND to the cache. Now we have a mysterious class not regsitered issue...
Diffstat (limited to 'sysdata_windows.go')
-rw-r--r--sysdata_windows.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go
index 7dbaae6..f454e89 100644
--- a/sysdata_windows.go
+++ b/sysdata_windows.go
@@ -38,6 +38,9 @@ var classTypes = [nctypes]*classData{
}
func (s *sysData) make() (err error) {
+ sysDatasLock.Lock()
+ defer sysDatasLock.Unlock()
+
ret := make(chan uiret)
defer close(ret)
ct := classTypes[s.ctype]
@@ -64,6 +67,8 @@ func (s *sysData) make() (err error) {
return r.err
}
s.hwnd = _HWND(r.ret)
+ addSysData(s.hwnd, s)
+ // TODO parent
return nil
}