summaryrefslogtreecommitdiff
path: root/area_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-30 22:14:55 -0400
committerPietro Gagliardi <[email protected]>2014-05-30 22:14:55 -0400
commit855a09656a382d4089674712b400391a6e9dd3f9 (patch)
tree5af7737d8cb3931db2ade3250f5ec7fba0dbe65c /area_windows.go
parenta3e27bfbd0a4109e96c90746174a4c5b2238c518 (diff)
Changed Areas on Windows to store their sysData inside the window memory instead of being given it via a closure. Actually having only one window class for all Areas comes next.
Diffstat (limited to 'area_windows.go')
-rw-r--r--area_windows.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/area_windows.go b/area_windows.go
index 6708a27..35438e3 100644
--- a/area_windows.go
+++ b/area_windows.go
@@ -604,8 +604,12 @@ var (
_setFocus = user32.NewProc("SetFocus")
)
-func areaWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
+func areaWndProc(unused *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
return func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
+ s := getSysData(hwnd)
+ if s == nil { // not yet saved
+ return storeSysData(hwnd, uMsg, wParam, lParam)
+ }
switch uMsg {
case _WM_PAINT:
paintArea(s)