Skip to content

Commit 043b0a7

Browse files
author
Alexey Ushakov
committedMar 29, 2022
8273355: Flickering on tooltip appearance IntelliJ IDEA 2021.2.1
Reviewed-by: serb, aghaisas
1 parent 2367228 commit 043b0a7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed
 

‎src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -59,6 +59,7 @@
5959
import java.awt.peer.WindowPeer;
6060
import java.util.List;
6161

62+
import java.util.Objects;
6263
import javax.swing.JComponent;
6364

6465
import sun.awt.AWTAccessor;
@@ -281,6 +282,16 @@ protected void disposeImpl() {
281282
super.disposeImpl();
282283
}
283284

285+
@Override
286+
public void setBackground(final Color c) {
287+
Color oldBg = getBackground();
288+
if (Objects.equals(oldBg, c)) {
289+
return;
290+
}
291+
super.setBackground(c);
292+
updateOpaque();
293+
}
294+
284295
@Override
285296
protected void setVisibleImpl(final boolean visible) {
286297
if (!visible && warningWindow != null) {

0 commit comments

Comments
 (0)
Please sign in to comment.