summaryrefslogtreecommitdiff
path: root/redo/area_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-11 12:00:18 -0400
committerPietro Gagliardi <[email protected]>2014-08-11 12:00:18 -0400
commit3ebbae73ec0d36e4a48549bd61df7dbf1e66451b (patch)
treee8173e7c2f509db55b55bf594555fa678d11d4a0 /redo/area_darwin.go
parentbb8603ed4e169cc4a9666e462cc5cd4f341ad100 (diff)
Fixed compilation errors on the Mac OS X side.
Diffstat (limited to 'redo/area_darwin.go')
-rw-r--r--redo/area_darwin.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/redo/area_darwin.go b/redo/area_darwin.go
index 1cb2e4b..c4c3d26 100644
--- a/redo/area_darwin.go
+++ b/redo/area_darwin.go
@@ -45,8 +45,7 @@ func areaView_drawRect(self C.id, rect C.struct_xrect, data unsafe.Pointer) {
// no need to clear the clip rect; the NSScrollView does that for us (see the setDrawsBackground: call in objc_darwin.m)
// rectangles in Cocoa are origin/size, not point0/point1; if we don't watch for this, weird things will happen when scrolling
cliprect := image.Rect(int(rect.x), int(rect.y), int(rect.x+rect.width), int(rect.y+rect.height))
- max := C.frame(self)
- cliprect = image.Rect(0, 0, int(max.width), int(max.height)).Intersect(cliprect)
+ cliprect = image.Rect(0, 0, int(a.width), int(a.height)).Intersect(cliprect)
if cliprect.Empty() { // no intersection; nothing to paint
return
}
@@ -83,8 +82,7 @@ func areaMouseEvent(self C.id, e C.id, click bool, up bool, data unsafe.Pointer)
xp := C.getTranslatedEventPoint(self, e)
me.Pos = image.Pt(int(xp.x), int(xp.y))
// for the most part, Cocoa won't geenerate an event outside the Area... except when dragging outside the Area, so check for this
- max := C.frame(self)
- if !me.Pos.In(image.Rect(0, 0, int(max.width), int(max.height))) {
+ if !me.Pos.In(image.Rect(0, 0, int(a.width), int(a.height))) {
return
}
me.Modifiers = parseModifiers(e)