JBR-5704 displaySyncOFF: javax/swing/JDialog/Transparency/TransparencyTest.java: JDialog transparency lost upon iconify/deiconify sequence

Corrected startRedraw method to call setNeedsDisplay in displaySync=false mode
This commit is contained in:
Alexey Ushakov
2023-06-02 19:27:32 +02:00
committed by Alexey Ushakov
parent 0fc303d51a
commit bd291402b1

View File

@@ -186,8 +186,12 @@ BOOL isDisplaySyncEnabled() {
}
- (void)startRedraw {
if (self.ctx != nil) {
[self.ctx performSelectorOnMainThread:@selector(startRedraw:) withObject:self waitUntilDone:NO];
if (isDisplaySyncEnabled()) {
if (self.ctx != nil) {
[self.ctx performSelectorOnMainThread:@selector(startRedraw:) withObject:self waitUntilDone:NO];
}
} else {
[self performSelectorOnMainThread:@selector(setNeedsDisplay) withObject:nil waitUntilDone:NO];
}
}