diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-17 20:42:36 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-17 20:42:36 -0400 |
| commit | 19227080da161bc96e4cc8ed447059cefbca8a6a (patch) | |
| tree | 818f4d443f469ee962268449d86ca406a7399514 /delegate_darwin.go | |
| parent | c078266c6d091610eb3acddd68090ee697142315 (diff) | |
Changed window resizes so that the actual Control.setRect() functions appended to an array of requests that the resize() function set all at once instead of having each done individually. This will be necessary for what I think will be a solution to the deadlocks. It doesn't work right now; I'm assuming it's allocating too much memory. I know how to fix this, but I'm committing what I have so far to be safe.
Diffstat (limited to 'delegate_darwin.go')
| -rw-r--r-- | delegate_darwin.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/delegate_darwin.go b/delegate_darwin.go index e914453..5999941 100644 --- a/delegate_darwin.go +++ b/delegate_darwin.go @@ -90,9 +90,12 @@ func appDelegate_windowDidResize(self C.id, sel C.SEL, notification C.id) { r := C.objc_msgSend_stret_rect_noargs(wincv, _frame) if sysData.resize != nil { // winheight is used here because (0,0) is the bottom-left corner, not the top-left corner - err := sysData.resize(int(r.x), int(r.y), int(r.width), int(r.height), int(r.height)) - if err != nil { - panic("child resize failed: " + err.Error()) + resizeList := sysData.resize(int(r.x), int(r.y), int(r.width), int(r.height)) + for _, s := range resizeList { + err := s.sysData.setRect(s.x, s.y, s.width, s.height, int(r.height)) + if err != nil { + panic("child resize failed: " + err.Error()) + } } } C.objc_msgSend_noargs(win, _display) // redraw everything; TODO only if resize() was called? |
