summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-21 02:27:59 -0500
committerPietro Gagliardi <[email protected]>2014-02-21 02:27:59 -0500
commite39a5d928c45f93d5d1379919d0a45c04021174f (patch)
treef3246b242521ef7e94292b8da473379dae77cbd7
parentbd51e3e9a7af663570a0f77d9cbf395ce31d66bf (diff)
Fixed the unregistered window class error on 64-bit Windows: turns out it was a difference in Go's int vs. what Windows expected (thanks Microsoft for not using your special types here). Fixed all instances of this, even in unmigrated/. Still does not work in wine...
-rw-r--r--stdwndclass_windows.go4
-rw-r--r--todo.md3
-rw-r--r--unmigrated/stdfont_windows.go18
3 files changed, 13 insertions, 12 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index 17784d0..3f52ea5 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -75,8 +75,8 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam
type _WNDCLASS struct {
style uint32
lpfnWndProc uintptr
- cbClsExtra int
- cbWndExtra int
+ cbClsExtra int32 // originally int
+ cbWndExtra int32 // originally int
hInstance _HANDLE
hIcon _HANDLE
hCursor _HANDLE
diff --git a/todo.md b/todo.md
index 4a92c36..7713d99 100644
--- a/todo.md
+++ b/todo.md
@@ -27,8 +27,9 @@ important things:
super ultra important things:
- for some reason events are now delayed on windows
- the windows build appears to be unstable:
- - 64-bit doesn't work, period: it crashes in malloc in wine with heap corruption warnings aplenty during DLL loading; in windows 7 CreateWindowExW complains about an unregistered window class, yet the RegisterClassW appears to have succeeded and examining the stack in WinDbg indicates the correct class name is being sent (see below)
+ - 64-bit doesn't work, period: it crashes in malloc in wine with heap corruption warnings aplenty during DLL loading; in windows 7 it works fine
- 32-bit: it works now, but if I save the class name converted to UTF-16 beforehand, wine indicates that the class name is replaced with the window title, so something there is wrong...
+- on 64-bit windows 7 comboboxes don't show their lists
- handle in-library panics (internal errors) by reporting them to the user
- david wendt is telling me he's getting frequent crashes on his end with the GTK+ amd64 build...
- I get soft deadlock if I mash the Click Me button repeatedly
diff --git a/unmigrated/stdfont_windows.go b/unmigrated/stdfont_windows.go
index 1ba086c..255013a 100644
--- a/unmigrated/stdfont_windows.go
+++ b/unmigrated/stdfont_windows.go
@@ -30,17 +30,17 @@ type LOGFONT struct {
type NONCLIENTMETRICS struct {
cbSize uint32
- iBorderWidth int
- iScrollWidth int
- iScrollHeight int
- iCaptionWidth int
- iCaptionHeight int
+ iBorderWidth int32 // originally int
+ iScrollWidth int32 // originally int
+ iScrollHeight int32 // originally int
+ iCaptionWidth int32 // originally int
+ iCaptionHeight int32 // originally int
lfCaptionFont LOGFONT
- iSmCaptionWidth int
- iSmCaptionHeight int
+ iSmCaptionWidth int32 // originally int
+ iSmCaptionHeight int32 // originally int
lfSmCaptionFont LOGFONT
- iMenuWidth int
- iMenuHeight int
+ iMenuWidth int32 // originally int
+ iMenuHeight int32 // originally int
lfMenuFont LOGFONT
lfStatusFont LOGFONT
lfMessageFont LOGFONT