summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--controlsize_windows.go1
-rw-r--r--stdwndclass_windows.go8
2 files changed, 6 insertions, 3 deletions
diff --git a/controlsize_windows.go b/controlsize_windows.go
index d43599c..0afd209 100644
--- a/controlsize_windows.go
+++ b/controlsize_windows.go
@@ -175,7 +175,6 @@ func releaseTextDC(hwnd _HWND, dc _HANDLE) {
}
}
-// This function runs on uitask; call the functions directly.
func (s *sysData) preferredSize(d *sysSizeData) (width int, height int) {
// the preferred size of an Area is its size
if stdDlgSizes[s.ctype].area {
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index 3fa23c4..ac5dfd9 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -116,7 +116,7 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL
switch ss.ctype {
case c_button:
if wParam.HIWORD() == _BN_CLICKED {
- ss.signal()
+ ss.event()
}
case c_checkbox:
// we opt into doing this ourselves because http://blogs.msdn.com/b/oldnewthing/archive/2014/05/22/10527522.aspx
@@ -164,7 +164,11 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL
}
return 0
case _WM_CLOSE:
- s.signal()
+ close := false // TODO decide apt default
+ s.close(&close)
+ if close {
+ s.hide()
+ }
return 0
default:
return defWindowProc(hwnd, uMsg, wParam, lParam)