lxqt / lxqt-panel

The LXQt desktop panel
https://lxqt-project.org
GNU Lesser General Public License v2.1
194 stars 135 forks source link

Workaround for translucency artifacts with Qt 6.8.0 on Wayland #2156

Closed tsujan closed 1 month ago

tsujan commented 1 month ago

Since Qt 6.8.0, random artifacts are possible in a translucent panel — and, generally, in all translucent windows (based on QWidget, not QML) — under Wayland. They may happen when the panel starts. They're sometimes temporary, sometimes persistent, especially when the panel doesn't accept focus.

This is a simple workaround, which guarantees fully transparent pixels before painting.

NOTE: The workaround has been 100% effective for me elsewhere (also see https://github.com/lxqt/lxqt-notificationd/pull/402) and is effective in the case of panel too.

tsujan commented 1 month ago

@stefonarch I'm not sure you've seen these artifacts too but requested a review.

tsujan commented 1 month ago

Yes, the logic is exactly that of https://github.com/lxqt/lxqt-notificationd/pull/402 as well as what I used in Kvantum for circumventing this bug. The artifacts happened a lot in kwin_wayland; now they've disappeared.