RFR: 8273355: Flickering on tooltip appearance IntelliJ IDEA 2021.2.1 [v2]
Sergey Bylokhov
serb at openjdk.java.net
Thu Mar 24 18:28:52 UTC 2022
On Thu, 24 Mar 2022 14:27:46 GMT, Alexey Ushakov <avu at openjdk.org> wrote:
>> src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java line 298:
>>
>>> 296: Color color = getBackground();
>>> 297: if (color != null) {
>>> 298: platformWindow.setBackground(color);
>>
>> If it skips the texture property I guess it will break it?
>> I think the easiest solution for this issue is to add a new method to the LWWindowPeer:
>> ```
>> public void setBackground(final Color c) {
>> Color oldBg = getBackground();
>> if (oldBg == c || (oldBg != null && oldBg.equals(c))) {
>> return;
>> }
>> super.setBackground(c);
>> updateOpaque();
>> }
>> }
>
>> If it skips the texture property I guess it will break it?
> I've not noticed it in my testing. Do you mean particular tests? But anyway your suggestion looks more elegant and it works in my scenarios, also I've run test-jdk_desktop_part1 with it. No related problem was found.
The CPlatformWindow.setOpaque() changes the background of the native window only if the texture property is not set. So if the code will change the color directly somewhere then the texture property will be broken. Not sure that we have a test for that.
Please update the copyright date.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7931
More information about the client-libs-dev
mailing list