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:
@@ -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,24 +229,32 @@ public class VirtualMediaPanel extends MediaPanel
|
|||||||
// "), d=(" + _dx + ", " + _dy +
|
// "), d=(" + _dx + ", " + _dy +
|
||||||
// "), width=" + width + ", height=" + height + "].");
|
// "), width=" + width + ", height=" + height + "].");
|
||||||
|
|
||||||
// these are used to prevent the vertical strip from
|
|
||||||
// overlapping the horizontal strip
|
|
||||||
int sy = _ny, shei = height;
|
|
||||||
|
|
||||||
// and add invalid rectangles for the exposed areas
|
// Mac OS X's redraw breaks on scrolling, so we repaint the
|
||||||
if (_dy > 0) {
|
// entire panel
|
||||||
shei = Math.max(shei - _dy, 0);
|
if (RunAnywhere.isMacOS()) {
|
||||||
_remgr.invalidateRegion(_nx, _ny + height - _dy, width, _dy);
|
_remgr.invalidateRegion(_nx, _ny, width, height);
|
||||||
} else if (_dy < 0) {
|
} else {
|
||||||
sy -= _dy;
|
// these are used to prevent the vertical strip from
|
||||||
_remgr.invalidateRegion(_nx, _ny, width, -_dy);
|
// overlapping the horizontal strip
|
||||||
}
|
int sy = _ny, shei = height;
|
||||||
if (_dx > 0) {
|
|
||||||
_remgr.invalidateRegion(_nx + width - _dx, sy, _dx, shei);
|
// and add invalid rectangles for the exposed areas
|
||||||
} else if (_dx < 0) {
|
if (_dy > 0) {
|
||||||
_remgr.invalidateRegion(_nx, sy, -_dx, shei);
|
shei = Math.max(shei - _dy, 0);
|
||||||
|
_remgr.invalidateRegion(_nx, _ny + height - _dy, width, _dy);
|
||||||
|
} else if (_dy < 0) {
|
||||||
|
sy -= _dy;
|
||||||
|
_remgr.invalidateRegion(_nx, _ny, width, -_dy);
|
||||||
|
}
|
||||||
|
if (_dx > 0) {
|
||||||
|
_remgr.invalidateRegion(_nx + width - _dx, sy, _dx, shei);
|
||||||
|
} else if (_dx < 0) {
|
||||||
|
_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
|
||||||
// booch everything
|
// booch everything
|
||||||
|
|||||||
Reference in New Issue
Block a user