diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-30 14:29:02 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-30 14:29:02 -0400 |
| commit | 8c18adcfdb1b0ce034c692204c49a1e57e4abe83 (patch) | |
| tree | 31e2e39d749ebe6412769865522e2159afc14489 /area_darwin.go | |
| parent | 6a40011f85dc26d51e41663f04f0dd304991e3eb (diff) | |
Fixed flaky redraw in Mac OS X Areas.
Diffstat (limited to 'area_darwin.go')
| -rw-r--r-- | area_darwin.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/area_darwin.go b/area_darwin.go index da55b50..50f43a3 100644 --- a/area_darwin.go +++ b/area_darwin.go @@ -55,7 +55,9 @@ var ( func areaView_drawRect(self C.id, rect C.struct_xrect) { s := getSysData(self) // TODO clear clip rect - cliprect := image.Rect(int(rect.x), int(rect.y), int(rect.width), int(rect.height)) + // rectangles in Cocoa are origin/size, not point0/point1; if we don't watch for this, weird things will happen when scrolling + // TODO change names EVERYWHERE ELSE to match + cliprect := image.Rect(int(rect.x), int(rect.y), int(rect.x + rect.width), int(rect.y + rect.height)) max := C.objc_msgSend_stret_rect_noargs(self, _frame) cliprect = image.Rect(0, 0, int(max.width), int(max.height)).Intersect(cliprect) if cliprect.Empty() { // no intersection; nothing to paint |
