Bug 456052 - Background blur apply blur to titlebar component
Summary: Background blur apply blur to titlebar component
Status: CONFIRMED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 22.04.2
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 457455 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-27 22:23 UTC by themachine02om
Modified: 2024-03-15 07:13 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Confirmed that this bug still exist in Konsole 22.12.3 (2.80 KB, image/png)
2023-04-21 19:58 UTC, Puspam Adak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description themachine02om 2022-06-27 22:23:09 UTC
SUMMARY
When selecting option to apply blur to background, konsole make a blur region corresponding to the whole windows including titlebar. If you are using a titlebar decoration allowing blur and rounded corner, it apply two time the blur and rounded corner are not included in the blur mask, producing infamous korner bug.
Other windows (for exemple help windows or About windows) correctly follow the decoration and doesn't expose corner bug.

STEPS TO REPRODUCE
1. Enable blur in konsole
2. Use a decoration (for example SierraBreezeEnhanced) that has rounded corner and correct support for blur
3. Reduce opacity of the titlebar to trigger blur of the decoration theme and observe blur from konsole also applied to titlebar

OBSERVED RESULT
Blur doesn't follow corner and is doubly applied in the main windows

EXPECTED RESULT
Konsole doesn't take care of exporting blurred region of the titlebar in the main windows

SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95
Qt Version: 5.15.5

ADDITIONAL INFORMATION
Konsole version : 22.04.2

I think the bug reside in the way blur is enabled in void MainWindow::setBlur(bool blur) :
KWindowEffects::enableBlurBehind is called directly with the whole windows argument and without specified region. One expect to pass to enableBlurBehind windows region without the titlebar I guess.
Comment 1 Puspam Adak 2023-04-21 19:58:24 UTC
Created attachment 158283 [details]
Confirmed that this bug still exist in Konsole 22.12.3
Comment 2 Paul McAuley 2023-06-09 01:36:21 UTC
*** Bug 457455 has been marked as a duplicate of this bug. ***
Comment 3 Paul McAuley 2023-06-09 01:47:30 UTC
I am the author of another window decoration and application style (https://github.com/paulmcauley/klassy) that applies blur to various components, and can confirm this bug in Konsole.

Another side effect is that blur doesn't show at all with my Application Style when I blur the toolbar/header area to match the titlebar.

This problem with Konsole is caused by the fact it is trying to apply blur to the entire window, rather than also specifying to blur just the input/output text area region. 

I'm assuming the following function is being used, and the problem is that the final optional region parameter has been omitted: 
KWindowEffects::enableBlurBehind(QWindow *window, bool enable = true, const QRegion &region = QRegion())
Comment 4 Paul McAuley 2024-03-07 17:29:18 UTC
The lack of specific region parameter in KWindowEffects::enableBlurBehind also prevents Konsole from blurring at all when the application style also blurs a region. E.g.:
https://github.com/paulmcauley/klassy/issues/114