Added the option to enable blur behind the window
ClosedPublic

Authored by anemeth on Jan 22 2018, 7:32 AM.

Details

Summary

This is to avoid the need to use the xprop hack to enable it.
It is disabled by default.
Also since the new blur method is landing (https://phabricator.kde.org/D9848) that is more efficient and much much higher quality than the current blur it will look really good.

FEATURE: 198175

Test Plan

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
anemeth created this revision.Jan 22 2018, 7:32 AM
Restricted Application added a project: Konsole. · View Herald TranscriptJan 22 2018, 7:32 AM
Restricted Application added a subscriber: Konsole. · View Herald Transcript
anemeth requested review of this revision.Jan 22 2018, 7:32 AM
anemeth retitled this revision from This is to avoid the need to use the xprop hack to enable it. It is disabled by default. Also since the new blur method is landing (https://phabricator.kde.org/D9848) that is more efficient and much much higher quality than the current blur it... to Added the option to enable blur behind the window.Jan 22 2018, 7:33 AM
anemeth edited the summary of this revision. (Show Details)
anemeth edited the summary of this revision. (Show Details)
anemeth edited the test plan for this revision. (Show Details)
anemeth added a reviewer: hindenburg.

In general, LGTM - have you tried this on Wayland?

Since it is disabled by default, we don't have to wait for kwin to be applied/released.

markg added a subscriber: markg.Jan 23 2018, 3:20 PM

I very much like it!
I among others tried to fix this as can be seen in issue #198175 but gave up due to the wildly different corner cases that would make a small change really complicated.

Lets hope those that have a say in this like your approach :)

In general, LGTM - have you tried this on Wayland?

My machine does not support Wayland, so I can't test it.
Could anyone else please test this?

I very much like it!
I among others tried to fix this as can be seen in issue #198175 but gave up due to the wildly different corner cases that would make a small change really complicated.

Lets hope those that have a say in this like your approach :)

I don't quite understand what the problem is with the blur here or the issue about blurring different regions of the window: https://bugs.kde.org/show_bug.cgi?id=198175

ngraham edited the summary of this revision. (Show Details)Jan 23 2018, 6:24 PM
anemeth updated this revision to Diff 25851.Jan 23 2018, 10:30 PM

Now only enables blur behind the standalone Konsole window.

markg added inline comments.Jan 23 2018, 10:32 PM
src/MainWindow.cpp
886

That can go i think ;)

anemeth updated this revision to Diff 25852.Jan 23 2018, 10:33 PM

Removed a qDebug() I added

anemeth marked an inline comment as done.Jan 23 2018, 10:33 PM

I'm getting crashes on start up with latest patch

src/MainWindow.cpp:884:30: runtime error: member call on null pointer of type 'Konsole::SessionController'

dos awarded a token.Jan 24 2018, 1:26 PM
dos added a subscriber: dos.

I'm getting crashes on start up with latest patch

src/MainWindow.cpp:884:30: runtime error: member call on null pointer of type 'Konsole::SessionController'

I can't reproduce the problem.
Tried with kdesrc-build and with KDevelop too
What's your environment?
How do you build and run Konsole?
Where did you get this message?

My asan build generates it on startup:

/home/kurthindenburg/Devel/KDE/src/kde/applications/konsole/src/MainWindow.cpp:884:30: runtime error: member call on null pointer of type 'Konsole::SessionController'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/kurthindenburg/Devel/KDE/src/kde/applications/konsole/src/MainWindow.cpp:884:30 in
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = konsole path = /usr/local/bin pid = 4609

I haven't research it further yet

cmake-options -DKONSOLE_BUILD_FONTEMBEDDER=TRUE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_COMPILER=clang++ -DECM_ENABLE_SANITIZERS='address;leak;undefined'
anemeth updated this revision to Diff 25917.Jan 24 2018, 10:32 PM
  • Fixed crash at startup
  • Blur updates when switching between tabs that has a profile that has blur disabled

The next "logical step" would be to implement the corner case that when someone has split view enabled with one side with a profile that has blur enabled and the other side(s) without blur.
We would need to update how XCB blurs, and I think that would be too big of a change.
Also I personally think that blurring the whole window is a better choice than blurring only parts of it, since this patch is for Konsole standalone only.

@hindenburg could you test it again please?

I don't find any obvious issues testing w/ Wayland or FreeBSD or my other setups. I haven't applied the "new blur" patch but as I understand that patch will just make the blur better looking.

hindenburg accepted this revision.Jan 31 2018, 4:07 PM

If anyone objects, please reply otherwise I'll commit.

This revision is now accepted and ready to land.Jan 31 2018, 4:07 PM

Big +1 from me, too.

This revision was automatically updated to reflect the committed changes.