Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8273355: Flickering on tooltip appearance IntelliJ IDEA 2021.2.1 #7931

Closed
wants to merge 4 commits into from

Conversation

avu
Copy link

@avu avu commented Mar 23, 2022

Used setOpaque() method to set correct background of platform window
Extracted setting background to the particular method in PlatformWindow. Provided appropriate implementation in CPlatformWindow.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8273355: Flickering on tooltip appearance IntelliJ IDEA 2021.2.1

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7931/head:pull/7931
$ git checkout pull/7931

Update a local copy of the PR:
$ git checkout pull/7931
$ git pull https://git.openjdk.java.net/jdk pull/7931/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7931

View PR using the GUI difftool:
$ git pr show -t 7931

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7931.diff

Used setOpaque() method to set correct background of platform window
Extracted setting background to the particular method in PlatformWindow. Provided appropriate implementation in CPlatformWindow.
@bridgekeeper
Copy link

bridgekeeper bot commented Mar 23, 2022

👋 Welcome back avu! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 23, 2022
@openjdk
Copy link

openjdk bot commented Mar 23, 2022

@avu The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Mar 23, 2022
@mlbridge
Copy link

mlbridge bot commented Mar 23, 2022

Webrevs

// (when initial background color replaced with the content layer's color)
Color color = getBackground();
if (color != null) {
platformWindow.setBackground(color);
Copy link
Member

@mrserb mrserb Mar 23, 2022

Choose a reason for hiding this comment

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

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();
   }
}

Copy link
Author

@avu avu Mar 24, 2022

Choose a reason for hiding this comment

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

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.

Copy link
Member

@mrserb mrserb Mar 24, 2022

Choose a reason for hiding this comment

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

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.

Copy link
Author

@avu avu Mar 28, 2022

Choose a reason for hiding this comment

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

@mrserb updated.

Alexey Ushakov added 3 commits Mar 24, 2022
mrserb
mrserb approved these changes Mar 29, 2022
Copy link
Contributor

@aghaisas aghaisas left a comment

The code changes look good.
All test run with OpenGL and Metal pipelines is fine.

Please see the 'Integration blocker' in Progress section of this PR above. It is ready to be pushed once that is corrected.

@avu
Copy link
Author

avu commented Mar 29, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Mar 29, 2022

@avu This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8273355: Flickering on tooltip appearance IntelliJ IDEA 2021.2.1

Reviewed-by: serb, aghaisas

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 70 new commits pushed to the master branch:

  • 2367228: 8283834: Unmappable character for US-ASCII encoding in TestPredicateInputBelowLoopPredicate
  • 2e9fd56: 8283670: gtest os.release_multi_mappings_vm is still racy
  • f01cce2: 8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS
  • 634800a: 8283806: [BACKOUT] JDK 19 L10n resource files update - msgdrop 10
  • 9b49900: 8283603: Remove redundant qualifier in Windows specific Attach Operation
  • d8fd222: 8282538: PKCS11 tests fail on CentOS Stream 9
  • d472c01: 8283711: Remove redundant 'new String' calls after concatenation
  • c0aecd1: 8280400: JDK 19 L10n resource files update - msgdrop 10
  • f0282d7: 8279488: ProcessBuilder inherits contextClassLoader when spawning a process reaper thread
  • a577656: 8282943: Unused weird key in compiler.properties
  • ... and 60 more: https://git.openjdk.java.net/jdk/compare/6ed0ba2f8a2af58c45a6b7be684ef30d15af6ead...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 29, 2022
@openjdk
Copy link

openjdk bot commented Mar 29, 2022

Going to push as commit 043b0a7.
Since your change was applied there have been 70 commits pushed to the master branch:

  • 2367228: 8283834: Unmappable character for US-ASCII encoding in TestPredicateInputBelowLoopPredicate
  • 2e9fd56: 8283670: gtest os.release_multi_mappings_vm is still racy
  • f01cce2: 8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS
  • 634800a: 8283806: [BACKOUT] JDK 19 L10n resource files update - msgdrop 10
  • 9b49900: 8283603: Remove redundant qualifier in Windows specific Attach Operation
  • d8fd222: 8282538: PKCS11 tests fail on CentOS Stream 9
  • d472c01: 8283711: Remove redundant 'new String' calls after concatenation
  • c0aecd1: 8280400: JDK 19 L10n resource files update - msgdrop 10
  • f0282d7: 8279488: ProcessBuilder inherits contextClassLoader when spawning a process reaper thread
  • a577656: 8282943: Unused weird key in compiler.properties
  • ... and 60 more: https://git.openjdk.java.net/jdk/compare/6ed0ba2f8a2af58c45a6b7be684ef30d15af6ead...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 29, 2022
@openjdk openjdk bot closed this Mar 29, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 29, 2022
@openjdk
Copy link

openjdk bot commented Mar 29, 2022

@avu Pushed as commit 043b0a7.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
3 participants