summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2017-10-13 20:07:21 (GMT)
committerfvogel <fvogel@noemail.net>2017-10-13 20:07:21 (GMT)
commit463cc21cfdacb279e2770b9a7f5742638126de82 (patch)
tree535e3659f2aee99cda743827691314b57fb24a13
parente41387218e7f6f44c8e0b61c88dd650885359fa7 (diff)
downloadtk-bug-fab5fed65e.zip
tk-bug-fab5fed65e.tar.gz
tk-bug-fab5fed65e.tar.bz2
Better fix for [fab5fed65e] from Marc Culler: Revert [dd0005dc8a] and add coordinate conversion in TkScrollWindow().bug-fab5fed65e
FossilOrigin-Name: 26302191d8f95ed9b7b7e1028889625498d3420792a191c8bd203e8a5ae84f06
-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;