summaryrefslogtreecommitdiff
path: root/area_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-04-10 18:52:43 -0400
committerPietro Gagliardi <[email protected]>2014-04-10 18:52:43 -0400
commita01ffafba0fac94c539eca33528af20b3e02cec5 (patch)
treef17bbcac9474798bd9e8c06708a1c579351bb9b1 /area_darwin.go
parentbd907dadd8d601acc4208b38c374aa0bcdb7c43f (diff)
Fixed Area mouse events being sent when something happens outside the Area itself.
Diffstat (limited to 'area_darwin.go')
-rw-r--r--area_darwin.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/area_darwin.go b/area_darwin.go
index dcc6941..9cdda68 100644
--- a/area_darwin.go
+++ b/area_darwin.go
@@ -143,6 +143,7 @@ func areaMouseEvent(self C.id, e C.id, click bool, up bool) {
s := getSysData(self)
xp := C.getTranslatedEventPoint(self, e)
me.Pos = image.Pt(int(xp.x), int(xp.y))
+ // no need to check me.Pos; Cocoa won't send an event outside the Area
me.Modifiers = parseModifiers(e)
which := uint(C.objc_msgSend_intret_noargs(e, _buttonNumber)) + 1
if which == 3 { // swap middle and right button numbers