Skip to content

Commit

Permalink
Check stylesheet before applying Wayland workaround for artifacts (#407)
Browse files Browse the repository at this point in the history
Fixes #406
  • Loading branch information
tsujan authored Nov 15, 2024
1 parent 21ca619 commit 853ae95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/notification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ void Notification::paintEvent(QPaintEvent *)
#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0))
// NOTE: Starting from Qt 6.8.0, random artifacts are possible in
// translucent windows under Wayland. This a workaround.
if (QGuiApplication::platformName() == QStringLiteral("wayland"))
if (QGuiApplication::platformName() == QStringLiteral("wayland")
&& testAttribute(Qt::WA_StyleSheetTarget))
{
auto origMode = p.compositionMode();
p.setCompositionMode(QPainter::CompositionMode_Clear);
Expand Down

0 comments on commit 853ae95

Please sign in to comment.