Summary:
We have a mix of different doxygen comment styles, e.g.
/*!
Foo bar.
*/
/**
* Foo bar.
*/
/** Foo bar.
*/
/**
* Foo bar.
*/
/**
* Foo bar.
**/
To make the code more consistent, this change updates the style of all
doxygen comments to the last one.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18683
Summary:
The "Force" part in WindowForceBackgroundContrastRole and WindowForceBlurRole
is confusing. If WindowForceBlurRole is set on a window, background
behind it won't be blurred.
By setting WindowForceBlurRole we tell the Blur effect "that's fine to
do your business behind transformed windows."
The Slide effect only translates windows, it doesn't distort them, etc.
So, we can set WindowForceBackgroundContrastRole and WindowForceBlurRole
for all windows.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15707
Summary:
If isActive() returns false, neither paintScreen nor paintWindow nor
postPaintScreen will be called.
So, `if (m_active)` checks are redundant.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15708
Summary:
Kdelibs coding style states the following about whitespace placement:
> For pointers or references, use a single space before '*' or '&', but not after
Source: https://community.kde.org/Policies/Kdelibs_Coding_Style#Whitespace
Also, putting a whitespace after ! is not common in KWin.
Test Plan: Switched between virtual desktops.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D14260
Summary: That's mostly to analyze what options people use in bug reports.
Test Plan:
* Enabled the Slide effect
* Ran `qdbus org.kde.KWin /KWin supportInformation`
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13843
Summary:
D9638 made docks to slide to "fix" the problem when switching to a
virtual desktop that has a window in full screen mode:
{F5615542}
As it turns out, people don't like this kind of behaviour. Another
problem with sliding of docks is that pager goes away.
This change disables sliding of docks by default. One can enable sliding
of docks by checking "Slide docks" checkbox in slide effect KCM.
Yet, transition to/from virtual desktop with a window in full screen
mode doesn't look great but that's somewhat acceptable:
{F5915681}
//(we don't see issues that are present in the video above because the new slide effect elevates docks if sliding of docks is disabled)//
Test Plan: Switched between virtual desktops, the default panel didn't slide.
Reviewers: #kwin, #plasma, #vdg, ngraham, graesslin
Reviewed By: #kwin, #plasma, #vdg, ngraham, graesslin
Subscribers: ngraham, graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13566
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:
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: 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:
The new slide effect tries to separate each virtual desktop
as much as possible. This separation makes the new slide
effect more intuitive than the old one.
Test Plan:
* switch between virtual desktops
* or, move a window to another virtual desktop
Reviewers: #vdg, #kwin, #plasma, graesslin, ngraham
Reviewed By: #kwin, #plasma, graesslin
Subscribers: mart, graesslin, abetts, ngraham, plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9638
Summary:
Currently, slide effect doesn't handle a case when there
is a moving client. This results in having window jumps.
This commit fixes it by fixing position of the moving client
during switching to another desktop.
Test Plan: * send window one desktop to the left/right using shortcuts
Reviewers: #kwin, #plasma, graesslin
Reviewed By: #kwin, #plasma, graesslin
Subscribers: graesslin, plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9487
Summary:
At the moment, there is no way to tweak duration of the slide animation.
This change adds a configuration module so it is possible to change
the duration.
Test Plan:
* enable virtual desktops
* go to `System Settings > Desktop Behaviour > Desktop Effects`
and select Slide effect under "Virtual Desktop Switching Animation"
* click settings/options button and change duration
Reviewers: #kwin, #plasma, graesslin
Reviewed By: #kwin, #plasma, graesslin
Subscribers: graesslin, plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9382
All KCMs and KWin core use the BuiltInEffects namespace to find and
interact with the effects. There is no information left in the desktop
file which are of usage. Thus they can be removed.
This method replaces the X-KDE-ORDERING property in the Effect's desktop
files. This change is a preparation step for integrating the new Effect
Loader which doesn't read the ordering information. Thus it needs to be
provided by the Effect itself so that the EffectsHandler can properly
insert it into the chain.
Also for the built-in Effects on the long run it doesn't make much sense
to install the desktop files. And binary plugin effects will migrate to
json metadata which also doesn't have the KService::Ptr. Thus overall it
simplifies to read this information directly from the Effect.
Lambda connections are tricky: they do not get automatically
disconnected when the captured [this] gets destroyed, but they get
disconnected when the sender object gets destroyed.
Thus the slide effect was crashing if it got disabled and a window
got deleted, because the connection was still present and tried to
access the destroyed this pointer.
To circumvent we need to pass this as context object.
REVIEW: 116712
All effects with
X-KWin-Exclusive-Category=category
are considered as mutual exclusive for specified category. So far this is
just a hint for the GUI representation. Such effects should get a
radio button while effects in the same category without that property
or with it set to false should get a checkbox.
As a first step the desktop change animation effects use this property
and are put into a new category "Virtual Desktop Switching Animation".
REVIEW: 116710
Rational behind this change is that displayWidth and displayHeight are
X specific API calls in kwinglobals. For the future it's easier to only
rely on functionality which goes through the EffectsHandler API which
allows easier adjustments in KWin core.
displayWidth() and displayHeight() are only used to get the size or the
complete rect of all screens. This is also provided by:
effects->virtualScreenGeometry() or
effects->virtualScreenSize()
REVIEW: 116021
Without setting the property, Plasma's panel and dialogs lose the
backgroundcontrast effect during slides, which makes them flicker.
As the panel is shown on screen all the time, this is quite a visible
bug. To fix this, when the slide effect is started, we check for window
types and properties of each window, and force the blur flag on if it's
unset.
If the background contrast flag is set to false, we leave the window
alone assuming that there's a reason to force it off. Windows that
are newly added during the slide get the same treatment, so something
popping up while sliding (such as the desktop switch OSD) also gets
the background effect applied.When the effect stops or is interupted, we
unset what we've set, and clean up our internal bookkeeping.
Thanks Martin and Thomas for the thorough review!
REVIEW:115857
As all effects have always been compiled into the same .so file it's
questionable whether resolving the effects through a library is useful
at all. By linking against the built-in effects we gain the following
advantages:
* don't have to load/unload the KLibrary
* don't have to resolve the create, supported and enabled functions
* no version check required
* no dependency resolving (effects don't use it)
* remove the KWIN_EFFECT macros from the effects
All the effects are now registered in an effects_builtins file which
maps the name to a factory method and supported or enabled by default
methods.
During loading the effects we first check whether there is a built-in
effect by the given name and make a shortcut to create it through that.
If that's not possible the normal plugin loading is used.
Completely unscientific testing [1] showed an improvement of almost 10
msec during loading all the effects I use.
[1] QElapsedTimer around the loading code, start kwin five times, take
average.
REVIEW: 115073