On Mac OS X, mark the entire panel as dirty when scrolling to fix artifact issues.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3229 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Landon Fuller
2004-11-23 20:09:23 +00:00
parent d9d3975027
commit 660ff94fc1
@@ -1,5 +1,5 @@
// //
// $Id: VirtualMediaPanel.java,v 1.29 2004/11/11 23:52:43 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -229,6 +229,12 @@ public class VirtualMediaPanel extends MediaPanel
// "), d=(" + _dx + ", " + _dy + // "), d=(" + _dx + ", " + _dy +
// "), width=" + width + ", height=" + height + "]."); // "), width=" + width + ", height=" + height + "].");
// Mac OS X's redraw breaks on scrolling, so we repaint the
// entire panel
if (RunAnywhere.isMacOS()) {
_remgr.invalidateRegion(_nx, _ny, width, height);
} else {
// these are used to prevent the vertical strip from // these are used to prevent the vertical strip from
// overlapping the horizontal strip // overlapping the horizontal strip
int sy = _ny, shei = height; int sy = _ny, shei = height;
@@ -246,6 +252,8 @@ public class VirtualMediaPanel extends MediaPanel
} else if (_dx < 0) { } else if (_dx < 0) {
_remgr.invalidateRegion(_nx, sy, -_dx, shei); _remgr.invalidateRegion(_nx, sy, -_dx, shei);
} }
}
// now go ahead and update our location so that changes in // now go ahead and update our location so that changes in
// between here and the call to paint() for this tick don't // between here and the call to paint() for this tick don't