summaryrefslogtreecommitdiff
path: root/newctrl/container_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'newctrl/container_windows.go')
-rw-r--r--newctrl/container_windows.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/newctrl/container_windows.go b/newctrl/container_windows.go
index 91aee8f..521b205 100644
--- a/newctrl/container_windows.go
+++ b/newctrl/container_windows.go
@@ -5,7 +5,6 @@ package ui
import (
"fmt"
"syscall"
- "unsafe"
)
// #include "winapi_windows.h"
@@ -38,10 +37,10 @@ func makeContainerWindowClass() error {
}
func newContainer() *container {
- c := new(container)
- c.controlSingleHWND = newControlSingleHWND(C.newContainer(unsafe.Pointer(c)))
// don't set preferredSize(); it should never be called
- return c
+ return &container{
+ controlSingleHWND: newControlSingleHWND(C.newContainer()),
+ }
}
// TODO merge with controlSingleHWND