My KWIN fork where I work on features like per-output virtual desktops
Find a file
Vlad Zagorodniy 8af2fa73dc Run clang-tidy with modernize-use-override check
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
2019-07-22 20:03:22 +03:00
autotests Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
cmake/modules
colorcorrection Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
data
decorations Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
doc
effects Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
helpers
kcmkwin Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
kconf_update
libinput Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
libkwineffects Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
platformsupport Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
plugins Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
qml
scripting Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
scripts
tabbox Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
tests Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
xwl Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
.arcconfig
.arclint
abstract_client.cpp
abstract_client.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
abstract_opengl_context_attribute_builder.cpp
abstract_opengl_context_attribute_builder.h
abstract_output.cpp
abstract_output.h
abstract_wayland_output.cpp
abstract_wayland_output.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
activation.cpp
activities.cpp
activities.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
appmenu.cpp
appmenu.h
atoms.cpp
atoms.h
client.cpp
client.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
client_machine.cpp
client_machine.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
CMakeLists.txt Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
composite.cpp
composite.h
config-kwin.h.cmake
COPYING
cursor.cpp
cursor.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
dbusinterface.cpp
dbusinterface.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
debug_console.cpp
debug_console.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
debug_console.ui
deleted.cpp
deleted.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
effectloader.cpp
effectloader.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
effects.cpp
effects.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
egl_context_attribute_builder.cpp
egl_context_attribute_builder.h
events.cpp
fixqopengl.h
focuschain.cpp
focuschain.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
geometry.cpp
geometrytip.cpp
geometrytip.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
gestures.cpp
gestures.h
globalshortcuts.cpp
globalshortcuts.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
group.cpp
group.h
HACKING.md
idle_inhibition.cpp
idle_inhibition.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
input.cpp
input.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
input_event.cpp
input_event.h
input_event_spy.cpp
input_event_spy.h
internal_client.cpp
internal_client.h
keyboard_input.cpp
keyboard_input.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
keyboard_layout.cpp
keyboard_layout.h
keyboard_layout_switching.cpp
keyboard_layout_switching.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
keyboard_repeat.cpp
keyboard_repeat.h
killwindow.cpp
killwindow.h
kwin.kcfg
kwin.notifyrc
kwinbindings.cpp
KWinDBusInterfaceConfig.cmake.in
layers.cpp
logind.cpp
logind.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
main.cpp
main.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
main_wayland.cpp
main_wayland.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
main_x11.cpp
main_x11.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
Mainpage.dox
manage.cpp
Messages.sh
modifier_only_shortcuts.cpp
modifier_only_shortcuts.h
moving_client_x11_filter.cpp
moving_client_x11_filter.h
netinfo.cpp
netinfo.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
onscreennotification.cpp
onscreennotification.h
options.cpp
options.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
org.kde.kappmenu.xml
org.kde.kwin.ColorCorrect.xml
org.kde.kwin.Compositing.xml
org.kde.kwin.Effects.xml
org.kde.kwin.OrientationSensor.xml
org.kde.KWin.VirtualDesktopManager.xml
org.kde.KWin.xml
orientation_sensor.cpp
orientation_sensor.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
osd.cpp
osd.h
outline.cpp
outline.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
outputscreens.cpp
outputscreens.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
overlaywindow.cpp
overlaywindow.h
placement.cpp
placement.h
platform.cpp
platform.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
pointer_input.cpp
pointer_input.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
popup_input_filter.cpp
popup_input_filter.h
README.md
rootinfo_filter.cpp
rootinfo_filter.h
rules.cpp
rules.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
scene.cpp
scene.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
screenedge.cpp
screenedge.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
screenlockerwatcher.cpp
screenlockerwatcher.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
screens.cpp
screens.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
settings.kcfgc
shadow.cpp
shadow.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
shell_client.cpp
shell_client.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
shortcutdialog.ui
sm.cpp
sm.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
tabgroup.cpp
tabgroup.h
tabletmodemanager.cpp
tabletmodemanager.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
TESTING.md
thumbnailitem.cpp
thumbnailitem.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
toplevel.cpp
toplevel.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
touch_hide_cursor_spy.cpp
touch_hide_cursor_spy.h
touch_input.cpp
touch_input.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
udev.cpp
udev.h
unmanaged.cpp
unmanaged.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
useractions.cpp
useractions.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
utils.cpp
utils.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
virtual_terminal.cpp
virtual_terminal.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
virtualdesktops.cpp
virtualdesktops.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
virtualdesktopsdbustypes.cpp
virtualdesktopsdbustypes.h
virtualkeyboard.cpp
virtualkeyboard.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
virtualkeyboard_dbus.cpp
virtualkeyboard_dbus.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
was_user_interaction_x11_filter.cpp
was_user_interaction_x11_filter.h
wayland_cursor_theme.cpp
wayland_cursor_theme.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
wayland_server.cpp
wayland_server.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
window_property_notify_x11_filter.cpp
window_property_notify_x11_filter.h
workspace.cpp
workspace.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
x11eventfilter.cpp
x11eventfilter.h
xcbutils.cpp
xcbutils.h
xkb.cpp
xkb.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
xkb_qt_mapping.h

KWin

KWin is an easy to use, but flexible, composited Window Manager for Xorg windowing systems (Wayland, X11) on Linux. Its primary usage is in conjunction with a Desktop Shell (e.g. KDE Plasma Desktop). KWin is designed to go out of the way; users should not notice that they use a window manager at all. Nevertheless KWin provides a steep learning curve for advanced features, which are available, if they do not conflict with the primary mission. KWin does not have a dedicated targeted user group, but follows the targeted user group of the Desktop Shell using KWin as it's window manager.

KWin is not...

  • a standalone window manager (c.f. openbox, i3) and does not provide any functionality belonging to a Desktop Shell.
  • a replacement for window managers designed for use with a specific Desktop Shell (e.g. GNOME Shell)
  • a minimalistic window manager
  • designed for use without compositing or for X11 network transparency, though both are possible.

Contacting KWin development team

Support

Application Developer

If you are an application developer having questions regarding windowing systems (either X11 or Wayland) please do not hesitate to contact us. Preferable through our mailing list. Ideally subscribe to the mailing list, so that your mail doesn't get stuck in the moderation queue.

End user

Please contact the support channels of your Linux distribution for user support. The KWin development team does not provide end user support.

Reporting bugs

Please use KDE's bugtracker and report for product KWin.

Developing on KWin

Please refer to hacking documentation for how to build and start KWin. Further information about KWin's test suite can be found in TESTING.md.

Guidelines for new features

A new Feature can only be added to KWin if:

  • it does not violate the primary missions as stated at the start of this document
  • it does not introduce instabilities
  • it is maintained, that is bugs are fixed in a timely manner (second next minor release) if it is not a corner case.
  • it works together with all existing features
  • it supports both single and multi screen (xrandr)
  • it adds a significant advantage
  • it is feature complete, that is supports at least all useful features from competitive implementations
  • it is not a special case for a small user group
  • it does not increase code complexity significantly
  • it does not affect KWin's license (GPLv2+)

All new added features are under probation, that is if any of the non-functional requirements as listed above do not hold true in the next two feature releases, the added feature will be removed again.

The same non functional requirements hold true for any kind of plugins (effects, scripts, etc.). It is suggested to use scripted plugins and distribute them separately.