diff --git a/event/event.go b/event/event.go index c8929fc63..91bc29233 100644 --- a/event/event.go +++ b/event/event.go @@ -252,7 +252,7 @@ type TouchEnd struct { Primary bool } -// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus. +// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus. type TouchCancel struct { // ID identifies the touch that caused the touch event. ID int diff --git a/genevents.go b/genevents.go index bfe2c52cd..c3acf4c82 100644 --- a/genevents.go +++ b/genevents.go @@ -274,7 +274,7 @@ var ( Members: membersTouch, }, { - Comment: "TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus.", + Comment: "TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus.", Members: []Member{ { Comment: "ID identifies the touch that caused the touch event.", diff --git a/internal/driver/event.go b/internal/driver/event.go index 1aefa37ef..a90c3181a 100644 --- a/internal/driver/event.go +++ b/internal/driver/event.go @@ -252,7 +252,7 @@ type TouchEnd struct { Primary bool } -// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus. +// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus. type TouchCancel struct { // ID identifies the touch that caused the touch event. ID int diff --git a/internal/restorable/rect.go b/internal/restorable/rect.go index f8e924dcb..842d43e8c 100644 --- a/internal/restorable/rect.go +++ b/internal/restorable/rect.go @@ -24,8 +24,8 @@ import ( type rectToPixels struct { m map[image.Rectangle][]byte - lastr image.Rectangle - lastpix []byte + lastR image.Rectangle + lastPix []byte } func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) { @@ -45,8 +45,8 @@ func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) { if r == newr { // Replace the region. rtp.m[r] = copied - if r == rtp.lastr { - rtp.lastpix = copied + if r == rtp.lastR { + rtp.lastPix = copied } return } @@ -57,8 +57,8 @@ func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) { // Add the region. rtp.m[newr] = copied - if newr == rtp.lastr { - rtp.lastpix = copied + if newr == rtp.lastR { + rtp.lastPix = copied } } @@ -84,16 +84,16 @@ func (rtp *rectToPixels) at(i, j int) (byte, byte, byte, byte, bool) { var pix []byte var r *image.Rectangle - if pt := image.Pt(i, j); pt.In(rtp.lastr) { - r = &rtp.lastr - pix = rtp.lastpix + if pt := image.Pt(i, j); pt.In(rtp.lastR) { + r = &rtp.lastR + pix = rtp.lastPix } else { for rr := range rtp.m { if pt.In(rr) { r = &rr - rtp.lastr = rr + rtp.lastR = rr pix = rtp.m[rr] - rtp.lastpix = pix + rtp.lastPix = pix break } }