https://bugs.kde.org/show_bug.cgi?id=477800
Bug ID: 477800 Summary: konsole does not use background images if opacity is not supported Classification: Applications Product: konsole Version: 24.01.80 Platform: Other OS: Linux Status: REPORTED Keywords: reproducible Severity: normal Priority: NOR Component: general Assignee: konsole-de...@kde.org Reporter: rdt12+...@psu.edu Target Milestone: --- SUMMARY *** I'm running Rocky Linux 9. My window manager is FVWM3. I have background images configured, but konsole displays a blank (black) background. *** STEPS TO REPRODUCE 1. Under Rocky Linux 9 with FVWM3 as a window manager, run konsole. 2. Configure a background in a profile. 3. Run konsole using that profile. OBSERVED RESULT Konsole's background is blank (black). EXPECTED RESULT Konsole's background is the image that was configured. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Rocky 9 - 9.3 (Blue Onyx) - Linux 5.14.0-362.8.1.el9_3.x86_64 (available in About System) KDE Plasma Version: 5.27.6 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.9 ADDITIONAL INFORMATION I can make konsole behave normally (the way that I expect) by reverting the following change: ``` git diff 57c9a6856439926972f217f61ad4a4e23ebbe0cc 1e611bd45870c0f094a480610633ec85f1f330a2 diff --git a/src/Part.cpp b/src/Part.cpp index 4a7cb601b..88ddfa3d1 100644 --- a/src/Part.cpp +++ b/src/Part.cpp @@ -60,8 +60,10 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &) action->setShortcutContext(Qt::WidgetWithChildrenShortcut); } - // Enable translucency support. - _viewManager->widget()->setAttribute(Qt::WA_TranslucentBackground, true); + // Enable translucency support if supported by the app. + if (_viewManager->widget()->window() && _viewManager->widget()->window()->testAttribute(Qt::WA_TranslucentBackground)) { + _viewManager->widget()->setAttribute(Qt::WA_TranslucentBackground, true); + } // create basic session createSession(); diff --git a/src/terminalDisplay/TerminalDisplay.cpp b/src/terminalDisplay/TerminalDisplay.cpp index a685e9d68..794e4ff68 100644 --- a/src/terminalDisplay/TerminalDisplay.cpp +++ b/src/terminalDisplay/TerminalDisplay.cpp @@ -697,7 +697,11 @@ void TerminalDisplay::paintEvent(QPaintEvent *pe) for (const QRect &rect : region) { dirtyImageRegion += widgetToImage(rect); - _terminalPainter->drawBackground(paint, rect, _terminalColor->backgroundColor(), true /* use opacity setting */); + // We can use the opacity settings only if we are in a top level window which actually supports opacity. + // Many apps that use a konsole part such as kate or dolphin don't for performance reasons. + // This will result in repaint glitches iin wayland due to missing damage information + const bool useOpacity = window() && window()->testAttribute(Qt::WA_TranslucentBackground); + _terminalPainter->drawBackground(paint, rect, _terminalColor->backgroundColor(), useOpacity); } if (_displayVerticalLine) { ``` I have no interest in transparency. I think that this two line "fix" needs to be reverted and replaced with something a little more nuanced. It seems that whether or not background images are displayed is orthogonal to whether or not an application supports transparency. -- You are receiving this mail because: You are watching all bug changes.