Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8298876: Swing applications do not get repainted coming out of sleep …
…on Windows 10

Reviewed-by: angorya, prr
  • Loading branch information
prsadhuk committed Jan 9, 2023
1 parent a503ec2 commit 4072412
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 92 deletions.
Expand Up @@ -258,7 +258,7 @@ public Graphics2D createGraphics(SurfaceData sd,
{
if (!done && sd instanceof D3DWindowSurfaceData) {
D3DWindowSurfaceData d3dw = (D3DWindowSurfaceData)sd;
if (!d3dw.isSurfaceLost() || validate(d3dw, false)) {
if (!d3dw.isSurfaceLost() || validate(d3dw)) {
trackScreenSurface(d3dw);
return new SunGraphics2D(sd, fgColor, bgColor, font);
}
Expand Down Expand Up @@ -452,7 +452,7 @@ public void run() {
} finally {
rq.unlock();
}
} else if (!validate(sd, true)) {
} else if (!validate(sd)) {
// it is possible that the validation may never
// succeed, we need to detect this and replace
// the d3dw surface with gdi; the replacement of
Expand All @@ -474,7 +474,7 @@ public void run() {
* @return true if surface wasn't lost or if restoration was successful,
* false otherwise
*/
private boolean validate(D3DWindowSurfaceData sd, boolean postEvent) {
private boolean validate(D3DWindowSurfaceData sd) {
if (sd.isSurfaceLost()) {
try {
sd.restoreSurface();
Expand All @@ -491,9 +491,7 @@ private boolean validate(D3DWindowSurfaceData sd, boolean postEvent) {
sd.markClean();
// since the surface was successfully restored we need to
// repaint whole window to repopulate the back-buffer
if (postEvent) {
repaintPeerTarget(sd.getPeer());
}
repaintPeerTarget(sd.getPeer());
} catch (InvalidPipeException ipe) {
return false;
}
Expand Down

This file was deleted.

1 comment on commit 4072412

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.