Summary:
Currently, effects like Maximize, Slide Back have problems with setting
WindowForceBlurRole. They store previous state of WindowForceBlurRole.
This is wrong. Instead they should either ignore previous state of
WindowForceBlur or refcount forced role.
There's no need for refcounting right now. For example, if several effects
force blur or background contrast, they are most likely in a conflict.
Please notice that the Desktop Grid effect uses the Present Windows
effect only to calculate transformations.
Some other problems with the code that sets WindowForceBlurRole:
* Maximize effect stores previous state of WindowForceBlurRole only
for one window. It ignores the fact that there could be several
active maximize animations;
* Desktop Grid/Present Windows/Slide back don't clean after themselves.
So, after using those effects for good amount of times, memory usage
will bump.
Test Plan:
* Enabled blur for Konsole
* Maximized Konsole
* Activated Present Windows
* Activated Desktop Grid
* Raised another window(to trigger Slide Back)
Reviewers: #kwin, fredrik
Reviewed By: fredrik
Subscribers: fredrik, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13479
Summary:
Some people may not like the sliding of desktop background. Add
corresponding option to disable the sliding of desktop background.
By disabling the sliding of desktop background and docks, one can
get old slide effect.
{F5912713, layout=center, size=full}
Test Plan:
* Unchecked "Slide desktop background" checkbox, switched desktop;
* Checked "Slide desktop background" checkbox, switched desktop.
Reviewers: #kwin, #plasma, #vdg, mart
Reviewed By: #kwin, #plasma, #vdg, mart
Subscribers: romangg, abetts, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13542
Summary:
While BuiltInEffects has effectData() function, many functions repeat
s_effectData.at(index(effect)), which is what effectData() is doing.
By using effectData(), we'll get rid of those repetitions and maybe make
easier transition to other underlying data structure that stores metadata
for builtin effects.
Test Plan: Compiles, all enabled builtin effects are loaded and working.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13587
Summary:
* Drop abstract BlurShader class
* Delete evil "using namespace KWin"
* Fix includes
* Use smart pointers
* Turn BlurShader into a QObject
* Fix coding style
* Add missing default cases
* Use default member initialization
* Delete methods that are used only once
* Use more const
* Use QRect::{top,right,bottom,left} methods in the setBlurRect method
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13110
Summary:
Window parts disappear very rapidly, it feels not really pleasant.
Animate also opacity so window parts disappear over time. This
makes fall apart animation more pleasant.
### Before
{F5912359}
### After
{F5912360}
Test Plan:
* Enabled fall apart effect
* Closed System Settings
Reviewers: #kwin, #plasma, #vdg, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, davidedmundson
Subscribers: ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13528
Summary:
The Fall Apart effect doesn't grab windows so a conflict could happen
if an alternative window open/close animation effect is enabled(e.g.
Fade, Glide).
### Before
{F5912324}
//Fall apart and Fade conflict with each other.//
### After
{F5912325}
//Only Fall apart animates the disappearing of System Settings.//
Test Plan:
* Enabled fall apart effect and fade effect
* Closed a window
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13527
Summary:
HBoxLayout was a bad choice for label-spinbox pairs. Use appropriate
layout(FormLayout) for such things.
Test Plan: The KCM still looks the same.
Reviewers: #kwin, mart
Reviewed By: #kwin, mart
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13422
Summary:
WindowBackgroundContrastRole property is a bool or undefined.
QVariant::isValid() returns true for QVariant(false) which is not what
we want for this code.
toBool on an invalid QVariant will return false.
Test Plan:
NA. Was based on code review.
To get a bug you'd have to PresentWindows/Slide effect manipulate a sliding popup, which
AFAIK doesn't happen.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13478
Summary:
Do not construct QStringList with classes of windows that ask for
permissions. Instead, create a static set of those window classes (to
avoid the unnecessary construction of QStringList and make lookups
faster).
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13440
The main problem was that inside the effect there was manualVerticalAngle,
which did not represent the actual rotation angle of the cube during the
animation, but used to calculate the position of the reflection. The actual
angle was calculated on-the-fly and was not exposed outside.
Brief description of what the code does:
- variables currentAngle and verticalCurrentAngle now always represent the
current position of the cube. They are updated when one uses the mouse and
inside the rotateCube() method, which is called in prePaintScreen().
- two queues, animations (used for Start / Stop / Left / Right) and
verticalAnimations (used for Up / Down) are used for scheduling the animations
if i.e. user presses several keys in a row. The code checks whether the last
animation has finished (and thus we need to start a new one) inside
prePaintScreen() and postPaintScreen()
- when the animation starts, code saves the starting position of the cube
inside startAngle, startFrontDesktop and verticalStartAngle variables, which
are used to calculate the actual cube position during the animation later.
This is done by startAnimation() and startVerticalAnimation(), which also
calculates the QTimeLine curves needed for animation
BUG: 213599
BUG: 373101
Differential Revision: https://phabricator.kde.org/D9860
Summary:
In D12678 blur was changed to use `blitFromFramebuffer()` instead of `glCopyTexSubImage2D()`
Now it checks if the GPU supports it.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13246
Summary:
Blur should now work on Wayland when scaling is used.
This does not affect X11 as `GLRenderTarget::virtualScreenScale()` is always 1 on X11
BUG: 391387
Depends on D12678
Test Plan:
- log in in a Wayland session
- turn display scaling to 2x
- open a transparent window (for example: Konsole with transparent and blur enabled profile)
- blurs the content under the window corretly
Reviewers: davidedmundson, #kwin
Reviewed By: davidedmundson, #kwin
Subscribers: romangg, apol, zzag, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12700
Test Plan:
* Maximized Konsole with enabled blur
* Everything works as expected
Reviewers: #kwin, mart
Reviewed By: #kwin, mart
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13156
Summary: It improves a little bit readability and comprehensibility of the code.
Reviewers: #kwin, mart
Reviewed By: #kwin, mart
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13116
Summary:
When disconnecting from `blurChanged` signal, `(w, connection)` pair is
being looked up three times. We can do better by using `QMap` in a more
STL-like way.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13118
Summary:
On wayland blur on secondary monitor would not render correctly.
BUG: 393723
Depends on D12452
Test Plan:
- use more than one output
- log in in a wayland session
- open a transparent window (for example: Konsole with transparent and blur enabled profile)
- drag the window to another screen
- blurs the content under the window corretly
Reviewers: #kwin, graesslin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: apol, zzag, davidedmundson, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12678
Summary: For more details, see D12452.
Reviewers: #kwin, davidedmundson, fredrik, mart
Reviewed By: #kwin, davidedmundson, mart
Subscribers: romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12466
Summary: Use the blur effect even while the window is being maximized/unmaximized.
Test Plan:
Before:
{F5828510}
After:
{F5828511}
Reviewers: #kwin, #vdg, graesslin, ngraham
Reviewed By: #kwin, #vdg, graesslin, ngraham
Subscribers: ngraham, graesslin, zzag, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12623
Summary:
Use the blur effect even when the present windows is used.
Previously it was only enabled for the close buttons and the dock.
Test Plan: {F5828442}
Reviewers: davidedmundson, fredrik, #vdg, #kwin, graesslin, ngraham
Reviewed By: #vdg, #kwin, graesslin, ngraham
Subscribers: ngraham, zzag, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12619
Summary:
`QGuiApplication::primaryScreen()->logicalDotsPerInch()` sometimes reports incorrect scale value, for example 95.951 (or even lower) instead of 96.0 at 1x scale and this caused to simply darken blurred areas instead of noising them.
This patch sets a minimum 1x scale for the noise texture, because realistically we will never be below that.
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: davidedmundson, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12519
Summary:
When you have two windows ontop of each other and you turn them
transparent, evidently you'll be able to see through them.
Not only does it look unpolished if the desktop window flashes through
your windows, it can pose a privacy risk as you'd be able to briefly
look through the lock screen.
This patch fades apps to black intead of to transparent. As this looks
weird for panels, so windows are also faded to opaque (if relevant) at
the same rate.
BUG: 388384
Reviewers: #plasma, graesslin
Subscribers: luebking, plasma-devel, kwin, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9608
Summary:
Resetting timeline while animating a window causes some visual "glitches",
see videos below. Even though we can't use `QTimer::toggleDirection`,
that's safe to delete code which resets timeline because `prePaintScreen`
figures out correct direction of the timeline.
Before
{F5809862, layout=center, size=full}
After
{F5809898, layout=center, size=full}
Reviewers: #kwin, davidedmundson
Reviewed By: davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12254
Summary:
Resetting timeline while animating a window causes some visual "glitches",
see videos below. Even though we can't use `QTimer::toggleDirection`,
that's safe to delete code which resets timeline because `prePaintScreen`
figures out correct direction of the timeline.
Before
{F5809835, layout=center, size=full}
After
{F5809850, layout=center, size=full}
Test Plan:
* Set duration to 5000
* Furiously click an icon in the task manager
Reviewers: #kwin, davidedmundson
Reviewed By: davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12253
ModelViewMatrix used to paint windows (which is aware about
multi-monitor configuration) was overriden by reflectionMatrix when
painting reflections, leading to wrong placement of reflections.
Now we just multiply old matrix and reflection matrix.
BUG: 378688
Differential Revision: https://phabricator.kde.org/D10465
ModelViewMatrix used to paint windows (which is aware about
multi-monitor configuration) was overriden by reflectionMatrix when
painting reflections, leading to wrong placement of reflections.
Now we just multiply old matrix and reflection matrix.
BUG: 378688
Differential Revision: https://phabricator.kde.org/D10465
Summary: This is a follow-up for D11377, as requested by @graesslin. The patch removes the default shortcuts for the {nav Move zoomed area} actions.
Test Plan:
Deployed KWin with patch, killed and restarted KWin, created and logged into new user account, then zoomed in:
- {key Meta Ctrl Arrows} do not move the zoomed view
- The actions are still visible (without shortcuts) in {nav System Settings > Shortcuts > Global Shortcuts > KWin}
- You can still set custom shortcuts for the actions, and they work
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11526
Summary:
KWin's window management powers are not as discoverable as they could be--particularly tiling, which by default has no visible UI and no keyboard shortcuts. Resolving this issue is highly relevant to {T6831}.
This patch re-assigns the {key Meta arrowkeys} shortcuts that are currently used for `move zoomed area` (which are pretty esoteric, infrequently-used actions), adding {key ctrl} to their shortcuts. This allows us to use their valuable {key Meta arrowkeys} for more useful and commonly-used window management actions:
- {key Meta Left}: quick tile window to the left
- {key Meta Right}: quick tile window to the right
- {key Meta Up}: quick-tile window to the top
- {key Meta Down}: quick-tile the window to the bottom
The patch also sets some default shortctuts for minimize and maximize:
- {key Meta PageDown}: minimize window
- {key Meta PageUp}: maximize/de-maximize the window
Test Plan:
Do a clean build
`make test` (no new test failures)
Reboot
Create and log into a new user account
- {key meta up} tiles the active window to the top
- {key meta down} tiles the active window to the bottom
- {key meta left} tiles the active window to the left
- {key meta right} tiles the active window to the right
- {key meta PageDown} minimizes the active window
- {key meta PageUp} maximizes and de-maximizes the active window
- {key meta ctrl up} moves the zoomed area up
- {key meta ctrl down} moves the zoomed area down
- {key meta ctrl left} moves the zoomed area to the left
- {key meta ctrl right} moves the zoomed area to the right
Reviewers: #kwin, #plasma, romangg
Reviewed By: #kwin, #plasma, romangg
Subscribers: mart, romangg, broulik, jnoack, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11377