flexagoon / rounded-window-corners

A GNOME extension that adds rounded corners to all windows
GNU General Public License v3.0
252 stars 10 forks source link

Some applications are blurry #24

Open ZhangYaoan opened 5 months ago

ZhangYaoan commented 5 months ago

The extension will cause slightly blurry application, including GTK-3 and Qt6 applications (both native wayland application). Just like issue#141 and #32 from original repo.

Is it the extension's bug or mutter's bug?

Will it be fixed in the future?

flexagoon commented 5 months ago

Do you have fractional scaling enabled?

ZhangYaoan commented 5 months ago

Do you have fractional scaling enabled?

Yes. I enabled 125% scaling.

DuttaAB-dev commented 5 months ago

Is it the extension's bug or mutter's bug?

Its probably just a mutter thing? Mutter even after all this years does not handle fractional scaling properly(scaling up to 200 and then scaling it down blah blah blah). Their implementation is very hacky and results in blurry texts, among other artifacts so I wouldn't really blame this extension. I don't even have this installed and yet there are these issues. Mostly noticeable in electron apps though, did you test them?

flexagoon commented 4 months ago

This may be a Mutter thing, though I only experienced a similar thing with Electron apps, and it happened even without rounded corners.

@ZhangYaoan can you please provide a list of apps where this happens?

ZhangYaoan commented 4 months ago

For Qt applications

I tested 2 Qt6 apps, qbittorrent and kvantum manager, both happens.

Qbittorrent with the extension enabled: qbittorrent_enable_extension

Disabled: qbittorrent_disable_extension

Enabled the extension: kvantummanager_enable_extension

Disabled: kvantummanager_disable_extension

For GTK applications

The bug won't happen in most of GTK apps.

But in some apps, it will happen (for example, LibreOffice). But the blur in GTK apps is very slight.

Enabled the extension:

libreoffice_enable_extension

Disabled:

libreoffice_disable_extension

The blur may not significant, but when I zoomed in the pictures, I noticed that the text anti-aliasing will become different after enable the extension. I think it may be related with the cause of the bug.

For Electron apps

I tested VSCodium and haven't observed any significant blur. I don't know if it will happen in other apps.

P.S. I think Qt6 apps are blurry enough to affect use, but GTK and Electron apps not.

ZhangYaoan commented 4 months ago

I noticed another thing strange: texts in menus are not so blurry as those in the window.

qbittorrent_enable_extension_2

I hope it will help you to find the cause of the bug.

LSeelig commented 4 months ago

I don't have this issue with QT apps, but I do have it with chromium apps (including electron, which is chromium based)

ZhangYaoan commented 4 months ago

I don't have this issue with QT apps, but I do have it with chromium apps (including electron, which is chromium based)

@LSeelig Are them native Wayland apps? XWayland apps are blurry when enabling fractional scaling, which caused by mutter.

If they are not Wayland apps, you can install mutter with XWayland native scaling from Fedora COPR or AUR, and enable experimental feature gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer', 'xwayland-native-scaling']"

LSeelig commented 4 months ago

I don't have this issue with QT apps, but I do have it with chromium apps (including electron, which is chromium based)

@LSeelig Are them native Wayland apps? XWayland apps are blurry when enabling fractional scaling, which caused by mutter.

If they are not Wayland apps, you can install mutter with XWayland native scaling from Fedora COPR or AUR, and enable experimental feature gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer', 'xwayland-native-scaling']"

I am using wayland flags. But I could try the mutter experiment at some point.

LSeelig commented 4 months ago

Ok. I did some more testing, and I can confirm a very slight blur on any application I tried, GTK3 or QT. I can't say QT apps or libreoffice stick out though; the only apps I had in the past noticed were electron apps (and the new Zed editor, which has broken window decorations without rounded).

Everything is wayland, as I am using vanilla mutter and all xwayland apps would be blurry. In the meantime, I am disabling rounded window corners unless I am attached to a monitor which doesn't need fractional scaling. I am afraid the approach taken by this extension simply might cause issues with mutter's fractional scaling that cannot be easily fixed. But if you're interested in trying to, I'd recommend you ask for assistance on the mutter or GNOME extensions Matrix.

amadeusp commented 4 months ago

I am not sure if I experience the same thing with extension version 3, as for me the windows are only blurry on GNOME's overview. I am on GNOME 46.3.1 Wayland, 200% scaling, 4k display and every non GTK4 app is blurry and slightly distorted on overview. See screen grabs below:

Screenshot from 2024-07-19 14-57-04 Screenshot from 2024-07-19 14-57-11

Let me know if this is a new issue and I am happy to create a separate report.

Many thanks in advance for looking into this.

ZhangYaoan commented 4 months ago

I am not sure if I experience the same thing with extension version 3, as for me the windows are only blurry on GNOME's overview. I am on GNOME 46.3.1 Wayland, 200% scaling, 4k display and every non GTK4 app is blurry and slightly distorted on overview. See screen grabs below:

Screenshot from 2024-07-19 14-57-04 Screenshot from 2024-07-19 14-57-11

Let me know if this is a new issue and I am happy to create a separate report.

Many thanks in advance for looking into this.

This is my system:

...

Yes, I have the same issue. But I think it is a different issue. This issue (#24) may be related with fractional scaling and you haven't enabled it. I suggest you to open a new issue.

P.S. I think the system information is not necessary (it make the comment too long and might increase the risk of your privacy leakage)

amadeusp commented 4 months ago

I am not sure if I experience the same thing with extension version 3, as for me the windows are only blurry on GNOME's overview. I am on GNOME 46.3.1 Wayland, 200% scaling, 4k display and every non GTK4 app is blurry and slightly distorted on overview. See screen grabs below: Screenshot from 2024-07-19 14-57-04 Screenshot from 2024-07-19 14-57-11 Let me know if this is a new issue and I am happy to create a separate report. Many thanks in advance for looking into this. This is my system:

...

Yes, I have the same issue. But I think it is a different issue. This issue (#24) may be related with fractional scaling and you haven't enabled it. I suggest you to open a new issue.

P.S. I think the system information is not necessary (it make the comment too long and might increase the risk of your privacy leakage)

OK, I will open a new issue tomorrow. And thanks for the note about the system information. I was always a little worried about putting it in trackers, but I was never quite sure what someone could do with that information. I removed it for now.

flexagoon commented 4 months ago

@amadeusp this is a side effect of solving #29. Read the description of https://github.com/flexagoon/rounded-window-corners/commit/1c0e89cbfd42703f95b42aca3f91cc0e8fd237b4 for more information.

It will be solved in the future, and you can open a tracking issue for it if you want, but there I can't really figure it out right now because the original codebase is a mess and I'm in the process of rewriting most of it just so that I could understand what's going on.

For now, I decided that the distortion isn't that significant since I've been running with it for a few days and completely forgot that it's even there

LSeelig commented 4 months ago

Just a heads up: The problems with fractional scaling in GNOME 46 are larger than your extension, so there might be some confusing feedback from people in the future.

Specifically, there are some bugs/flaws in the implementation in GTK4 apps (native, and flatpaks on GNOME 46 runtime) that make them fuzzier on some fractionally scaled screens. For reference:

https://gitlab.gnome.org/GNOME/mutter/-/issues/3346

My matrix message: image

amadeusp commented 4 months ago

I added the issue now: https://github.com/flexagoon/rounded-window-corners/issues/36