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

Bad Flicking on Linux with Integrated Graphics #218

Open
andrewauclair opened this issue May 13, 2024 · 7 comments
Open

Bad Flicking on Linux with Integrated Graphics #218

andrewauclair opened this issue May 13, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@andrewauclair
Copy link
Owner

Looks like the overlays flicker on and off really bad when dragging a window in Gnome on Arch.

@andrewauclair andrewauclair added the bug Something isn't working label May 13, 2024
@andrewauclair
Copy link
Owner Author

Played around with this for a while and reducing the number of repaint helps. I'm wondering if it's because I'm on an old laptop with integrated graphics. I'm sure that doesn't help.

@andrewauclair
Copy link
Owner Author

andrewauclair commented May 16, 2024

This will be fixed with the overlay refactor and was finally achieved by using a BufferStrategy instead of manually repainting the JFrame.

This didn't work out in the end. Need to test on a archlinux machine with an actual graphics card.

@Mino260806
Copy link

Mino260806 commented Aug 2, 2024

Same issue on Linux Mint 21.1 with integrated graphics. Laptop is fairly new though.
The flickering causes a huge lag.

screenrecord-2024-08-02_16.55.23.mp4

Edit:
After some unsuccessful tinkering with the source code, I figured out the root cause is renderPanel.setOpaque(false) inside FloatUtilsFrame. However, I was unable to fix it

This 11-year-old stackoverflow question describes the exact problem, but it has no answer

@andrewauclair
Copy link
Owner Author

Interesting. That is the exact behavior I've seen on Arch. Maybe integrated graphics is the common issue. I had found a fix for it, but it broke the windows side of Modern Docking. I'll look into some way that I can do Linux specific code.

@andrewauclair andrewauclair changed the title Bad Flicking on Linux Gnome Bad Flicking on Linux with Integrated Graphics Aug 3, 2024
@Mino260806
Copy link

Maybe integrated graphics is the common issue.

Maybe it's an issue with Gnome rather than integrated graphics? The person in the SO question mentions having "nvidia drivers", so he most likely has dedicated graphics.

Did you confirm it works in a linux computer with dedicated graphics ?

I had found a fix for it, but it broke the windows side of Modern Docking

Why don't you put a check on the OS type and operate accordingly ?


There is something else to point out, the overlay thinks the window size is bigger than it originally is, so the right and bottom handles overflow the screen (see video again). Did you also find a fix for this ?

@andrewauclair
Copy link
Owner Author

Maybe it's an issue with Gnome rather than integrated graphics? The person in the SO question mentions having "nvidia drivers", so he most likely has dedicated graphics.

Did you confirm it works in a linux computer with dedicated graphics ?

Yes. I use this at work on Gnome on CentOS and haven't encountered this issue there.

I had found a fix for it, but it broke the windows side of Modern Docking

Why don't you put a check on the OS type and operate accordingly ?

That's likely what I'll try.


There is something else to point out, the overlay thinks the window size is bigger than it originally is, so the right and bottom handles overflow the screen (see video again). Did you also find a fix for this ?

That is intentional. The overlap frame is larger to account for drawing handles off the edge of the main frame.

@andrewauclair
Copy link
Owner Author

Maybe integrated graphics is the common issue.

Good news. I finally had the time and energy to fix this. I believe I have a working solution. The common issue appears to be integrated graphics not supporting multi-buffer. Wrote some code that will work one way for multi-buffer and another when it's not available and have tested that.

There is something else to point out, the overlay thinks the window size is bigger than it originally is, so the right and bottom handles overflow the screen (see video again). Did you also find a fix for this ?

Sorry, I just realized this is actually an issue. Looks to be specific to using the application in full screen mode. Looking into it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants