Skip to content

Commit b5f1959

Browse files
committed
JBR-9727 Wayland: assertion error in ShadowImpl.updateSurfaceData
1 parent 621e901 commit b5f1959

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/java.desktop/unix/classes/sun/awt/wl/WLComponentPeer.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,12 @@ private boolean targetIsModal() {
448448
}
449449

450450
void updateSurfaceData() {
451-
SurfaceData.convertTo(WLSurfaceDataExt.class, surfaceData).revalidate(
452-
getGraphicsConfiguration(), getBufferWidth(), getBufferHeight(), getDisplayScale());
451+
performLocked(() -> {
452+
SurfaceData.convertTo(WLSurfaceDataExt.class, surfaceData).revalidate(
453+
getGraphicsConfiguration(), getBufferWidth(), getBufferHeight(), getDisplayScale());
453454

454-
shadow.updateSurfaceData();
455+
shadow.updateSurfaceData();
456+
});
455457
}
456458

457459
public boolean isResizable() {
@@ -1065,10 +1067,11 @@ public boolean updateGraphicsData(GraphicsConfiguration gc) {
10651067
log.fine(String.format("%s is updating buffer to %dx%d pixels", this, getBufferWidth(), getBufferHeight()));
10661068
}
10671069
}
1068-
updateSurfaceData();
1069-
postPaintEvent();
10701070
}
10711071

1072+
updateSurfaceData();
1073+
postPaintEvent();
1074+
10721075
// Not sure what would need to have changed in Wayland's graphics configuration
10731076
// to warrant destroying the peer and creating a new one from scratch.
10741077
// So return "never recreate" here.

0 commit comments

Comments
 (0)