summaryrefslogtreecommitdiff
path: root/sysdata_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'sysdata_windows.go')
-rw-r--r--sysdata_windows.go26
1 files changed, 9 insertions, 17 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go
index 7a5abae..326db06 100644
--- a/sysdata_windows.go
+++ b/sysdata_windows.go
@@ -226,23 +226,15 @@ func (s *sysData) setText(text string) error {
}
func (s *sysData) setRect(x int, y int, width int, height int) error {
- ret := make(chan uiret)
- defer close(ret)
- uitask <- &uimsg{
- call: _moveWindow,
- p: []uintptr{
- uintptr(s.hwnd),
- uintptr(x),
- uintptr(y),
- uintptr(width),
- uintptr(height),
- uintptr(_TRUE),
- },
- ret: ret,
- }
- r := <-ret
- if r.ret == 0 { // failure
- return fmt.Errorf("error setting window/control rect: %v", r.err)
+ r1, _, err := _moveWindow.Call(
+ uintptr(s.hwnd),
+ uintptr(x),
+ uintptr(y),
+ uintptr(width),
+ uintptr(height),
+ uintptr(_TRUE))
+ if r1 == 0 { // failure
+ return fmt.Errorf("error setting window/control rect: %v", err)
}
return nil
}