summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDraw.c1
-rw-r--r--macosx/tkMacOSXWindowEvent.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 5ca8bfe..93e0495 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1535,6 +1535,7 @@ TkScrollWindow(
/* Convert to Tk coordinates. */
TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn);
+ TkMacOSXOffsetRegion(damageRgn, -macDraw->xOff, -macDraw->yOff);
if (extraRgn) {
CFRelease(extraRgn);
}
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 4672586..a669a8a 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -357,8 +357,8 @@ GenerateUpdates(
event.xany.window = Tk_WindowId(winPtr);
event.xany.display = Tk_Display(winPtr);
event.type = Expose;
- event.xexpose.x = damageBounds.origin.x;
- event.xexpose.y = damageBounds.origin.y;
+ event.xexpose.x = damageBounds.origin.x - bounds.origin.x;
+ event.xexpose.y = damageBounds.origin.y - bounds.origin.y;
event.xexpose.width = damageBounds.size.width;
event.xexpose.height = damageBounds.size.height;
event.xexpose.count = 0;