summaryrefslogtreecommitdiff
path: root/redo/window_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-26 14:11:03 -0400
committerPietro Gagliardi <[email protected]>2014-07-26 14:11:03 -0400
commitd34ffa326c98f1c385d2068ede115887e23b3e7e (patch)
tree30de1c8a595a117184d48ce9524b2fff0fc0b13b /redo/window_windows.go
parent22989c13da1ece51a815046ee68ff57c36bbeaeb (diff)
Made the sizing recursive chain idempotent and added a -spaced option to the test program to test spacing.
Diffstat (limited to 'redo/window_windows.go')
-rw-r--r--redo/window_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/redo/window_windows.go b/redo/window_windows.go
index 96a9d5e..90b3e5e 100644
--- a/redo/window_windows.go
+++ b/redo/window_windows.go
@@ -43,7 +43,6 @@ func newWindow(title string, width int, height int, control Control) *window {
closing: newEvent(),
container: new(container),
}
- w.container.beginResize = w.beginResize
hwnd := C.newWindow(toUTF16(title), C.int(width), C.int(height), unsafe.Pointer(w))
if hwnd != w.hwnd {
panic(fmt.Errorf("inconsistency: hwnd returned by CreateWindowEx() (%p) and hwnd stored in window (%p) differ", hwnd, w.hwnd))
@@ -97,6 +96,7 @@ func storeWindowHWND(data unsafe.Pointer, hwnd C.HWND) {
//export windowResize
func windowResize(data unsafe.Pointer, r *C.RECT) {
w := (*window)(data)
+ w.container.d = w.beginResize()
w.resize(int(r.right - r.left), int(r.bottom - r.top))
}