From 9bfe67c49d6580bf977403fecf4d345db7524747 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 11 Feb 2014 19:43:07 -0500 Subject: 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... --- sysdata_windows.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdata_windows.go') 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 } -- cgit v1.2.3