The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.
In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
Summary:
So far we were following a bit unique and rare doxygen comment style:
/**
* Contents of the comment.
**/
Doxygen comments with this style look balanced and neat, but many people
that contribute to KWin don't follow this style. Instead, they prefer
more traditional doxygen comment style, i.e.
/**
* Contents of the comment.
*/
Reviewing such changes has been a bit frustrating for me (so selfish!)
and for other contributors.
This change switches doxygen comment style in KWin to a more traditional
style. The main reason for doing this is to make code review process easier
for new contributors as well us.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22812
Summary:
Currently code base of kwin can be viewed as two pieces. One is very
ancient, and the other one is more modern, which uses new C++ features.
The main problem with the ancient code is that it was written before
C++11 era. So, no override or final keywords, lambdas, etc.
Quite recently, KDE compiler settings were changed to show a warning if
a virtual method has missing override keyword. As you might have already
guessed, this fired back at us because of that ancient code. We had
about 500 new compiler warnings.
A "solution" was proposed to that problem - disable -Wno-suggest-override
and the other similar warning for clang. It's hard to call a solution
because those warnings are disabled not only for the old code, but also
for new. This is not what we want!
The main argument for not actually fixing the problem was that git
history will be screwed as well because of human factor. While good git
history is a very important thing, we should not go crazy about it and
block every change that somehow alters git history. git blame allows to
specify starting revision for a reason.
The other argument (human factor) can be easily solved by using tools
such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
be used for various things, e.g. fixing coding style(e.g. add missing
braces to if statements, readability-braces-around-statements check),
or in our case add missing override keywords.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, apol, romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22371
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:
Creating the OutlineVisual is moved into the Platform API. The default
implementation creates the composited OutlineVisual. The X11 standalone
platform overrides it and creates the non composited outline in case no
compositing is used.
Test Plan:
Run kwin_x11 with KWIN_COMPOSE=N and KWIN_COMPOSE=X,
non composited outline and composited outline loaded
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7450
When quick tiling animate the outline from the window geometry to the position it would have afterwards.
This provides a visual hint to from where to where the window will go.
Differential Revision: https://phabricator.kde.org/D5262
According to the documentation the ownership of a QObject created by
QQmlComponent::create is transferred to the caller.
This fixes a crash on KWin tear down.
In order to get all our UI being written in QML, the Outline for
compositing is ported to QtQuick. It creates a QQmlContext and
QQmlComponent and loads the (currently hardcoded) qml file. The context
gets to properties exported: outline. The outline property allows the qml
to get the geometry it should use. The QQmlEngine is used from Scripting
thus all general scripting properties are exported (e.g. workspace).
The qml script is expected to create a QQuickWindow as it's root item
and style it.
The qml file is stored in a new qml subdirectory. The idea is that each
of the qml types we have gets an own directory there and for each
implementation there should be a further subdirectory.
Thus we have outline/plasma/ with outline being the type and plasma
being the implementation. But at the moment the script location is still
hardcoded.
REVIEW: 116123
It's only used from useractions.cpp which means that it's not the best
fit in utils. We can see the problems with it given that it was in an
ifdef and it included quite some headers into everything.
REVIEW: 110189
The non-composited part handles the showWithX case with the four small
windows. The composited part shows a translucent QWidget with the
FrameSvg as done by the selection effect frame.
Outline connects to the Compositor toggled signal to switch the mode if
compositing gets suspended/resumed. This works fine also in the case that
the switch happens while the outline is shown. To support this Outline
is now a QObject and created with Workspace as a parent.
Given that the Outline handles both cases by itself, the outline effect
is no longer needed and is dropped together with all the hooks into the
effect system.
It's an option doing pretty much the same as the highlight of selected
window option. But it is known to conflict especially with some Plasma
themes.
BUG: 310935
FIXED-IN: 4.11
REVIEW: 110140
Use xcb to create and manage the X11 backend of Outline. In addition the
used background pixmaps are rendered with XRender instead of using a
QPainter on a QPixmap. This is done because QPixmap is no longer bound to
an X Pixmap.
To create the XRender Picture the available functionality from
kwinxrenderutils is used. To be able to use it in KWin core the compile
option to build without XRender is removed for kwinxrenderutils, but
still supported for effects.
Obviously the port to XCB is not complete as xremderutils itself is still
on XLib.
REVIEW: 108642
Unless the mouse pointer is not next to an electric border kwin calls
Outline::hide() on every move/resize event. To avoid unnecessary
repaints we now check whether the outline has been visible or not.
This change unduplicates some code and merges it into one class
allowing us to use an replacement effect for the outline in
future.
CCMAIL: a.arlt@stud.uni-heidelberg.de
REVIEW: 100848