summaryrefslogtreecommitdiff
path: root/combobox.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-17 21:09:03 -0400
committerPietro Gagliardi <[email protected]>2014-03-17 21:09:03 -0400
commit64d5eb541eb28e1a7e81adca66a72155d16033b4 (patch)
tree7db7c7ee787afc02823833340c3a2d0068807117 /combobox.go
parentc1807033733654db480e782acebdccda9eababc6 (diff)
Changed the new resizing code so that it uses the same allocated slice per window instead of making a new one to store all the resize requests each time.
Diffstat (limited to 'combobox.go')
-rw-r--r--combobox.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/combobox.go b/combobox.go
index ae2edfd..2b50a72 100644
--- a/combobox.go
+++ b/combobox.go
@@ -143,14 +143,14 @@ func (c *Combobox) make(window *sysData) (err error) {
return nil
}
-func (c *Combobox) setRect(x int, y int, width int, height int) []resizerequest {
- return []resizerequest{resizerequest{
+func (c *Combobox) setRect(x int, y int, width int, height int, rr *[]resizerequest) {
+ *rr = append(*rr, resizerequest{
sysData: c.sysData,
x: x,
y: y,
width: width,
height: height,
- }}
+ })
}
func (c *Combobox) preferredSize() (width int, height int) {