You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
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
5 years ago
autotests Run clang-tidy with modernize-use-override check 5 years ago
cmake/modules Update URLs to use https 6 years ago
colorcorrection Run clang-tidy with modernize-use-override check 5 years ago
data Use new logging category directory when ECM>=5.59 5 years ago
decorations Run clang-tidy with modernize-use-override check 5 years ago
doc Update URLs to use https 6 years ago
effects Run clang-tidy with modernize-use-override check 5 years ago
helpers Port away from deprecated headers 5 years ago
kcmkwin Run clang-tidy with modernize-use-override check 5 years ago
kconf_update kconfig_update for auto border size introduction 5 years ago
libinput Run clang-tidy with modernize-use-override check 5 years ago
libkwineffects Run clang-tidy with modernize-use-override check 5 years ago
platformsupport Run clang-tidy with modernize-use-override check 5 years ago
plugins Run clang-tidy with modernize-use-override check 5 years ago
qml
scripting Run clang-tidy with modernize-use-override check 5 years ago
scripts Install KPackages with kpackage_install_package 5 years ago
tabbox Run clang-tidy with modernize-use-override check 5 years ago
tests Run clang-tidy with modernize-use-override check 5 years ago
xwl Run clang-tidy with modernize-use-override check 5 years ago
.arcconfig
.arclint
CMakeLists.txt Run clang-tidy with modernize-use-override check 5 years ago
COPYING
HACKING.md Introduce a new HACKING.md document to replace the previous HACKING 6 years ago
KWinDBusInterfaceConfig.cmake.in
Mainpage.dox
Messages.sh
README.md Add a new markdown README 6 years ago
TESTING.md [platform/virtual] Drop support for vgem and rendernode 6 years ago
abstract_client.cpp Don't use deprecated toAscii() method 5 years ago
abstract_client.h Run clang-tidy with modernize-use-override check 5 years ago
abstract_opengl_context_attribute_builder.cpp
abstract_opengl_context_attribute_builder.h
abstract_output.cpp Overhaul AbstractOutput 5 years ago
abstract_output.h Overhaul AbstractOutput 5 years ago
abstract_wayland_output.cpp Fix xdg-output creation 5 years ago
abstract_wayland_output.h Run clang-tidy with modernize-use-override check 5 years ago
activation.cpp Support NET_WM_STATE_FOCUSED 5 years ago
activities.cpp
activities.h Run clang-tidy with modernize-use-override check 5 years ago
appmenu.cpp
appmenu.h
atoms.cpp [xwl] text/x-uri converter for selected X url list format targets 6 years ago
atoms.h [xwl] text/x-uri converter for selected X url list format targets 6 years ago
client.cpp Don't crash when highlighted tabbox client is closed 5 years ago
client.h Run clang-tidy with modernize-use-override check 5 years ago
client_machine.cpp
client_machine.h Run clang-tidy with modernize-use-override check 5 years ago
composite.cpp Save Compositor state in single variable 5 years ago
composite.h Save Compositor state in single variable 5 years ago
config-kwin.h.cmake [platforms/drm] EGLStream DRM Backend Initial Implementation 6 years ago
cursor.cpp Drop XFixes include in cursor.cpp 6 years ago
cursor.h Run clang-tidy with modernize-use-override check 5 years ago
dbusinterface.cpp Partly remove Compositor restart functionality 5 years ago
dbusinterface.h Run clang-tidy with modernize-use-override check 5 years ago
debug_console.cpp Support CriticalNotification type and place it in a CriticalNotificationLayer 5 years ago
debug_console.h Run clang-tidy with modernize-use-override check 5 years ago
debug_console.ui
deleted.cpp [wayland] Make sure that only the fading popups effect animates outline 6 years ago
deleted.h Run clang-tidy with modernize-use-override check 5 years ago
effectloader.cpp
effectloader.h Run clang-tidy with modernize-use-override check 5 years ago
effects.cpp Port away from deprecated headers 5 years ago
effects.h Run clang-tidy with modernize-use-override check 5 years ago
egl_context_attribute_builder.cpp
egl_context_attribute_builder.h
events.cpp Correct code style of Client fullscreen control 5 years ago
fixqopengl.h
focuschain.cpp
focuschain.h Run clang-tidy with modernize-use-override check 5 years ago
geometry.cpp Rework Client fullscreen control 5 years ago
geometrytip.cpp
geometrytip.h Run clang-tidy with modernize-use-override check 5 years ago
gestures.cpp
gestures.h Fix minor Doxygen issues 6 years ago
globalshortcuts.cpp
globalshortcuts.h Run clang-tidy with modernize-use-override check 5 years ago
group.cpp Port away from deprecated headers 5 years ago
group.h
idle_inhibition.cpp Use appropriate sequence algorithms in IdleInhibition 6 years ago
idle_inhibition.h Run clang-tidy with modernize-use-override check 5 years ago
input.cpp Merge branch 'Plasma/5.16' 5 years ago
input.h Run clang-tidy with modernize-use-override check 5 years ago
input_event.cpp Send axis_source, axis_discrete, and axis_stop 5 years ago
input_event.h Send axis_source, axis_discrete, and axis_stop 5 years ago
input_event_spy.cpp
input_event_spy.h
internal_client.cpp [wayland] Apply window rules only to xdg-shell clients 5 years ago
internal_client.h [wayland] Apply window rules only to xdg-shell clients 5 years ago
keyboard_input.cpp Remove X clipboard sync helper and rename its autotest 6 years ago
keyboard_input.h Run clang-tidy with modernize-use-override check 5 years ago
keyboard_layout.cpp Make the Keyboard Layout SNI passive 6 years ago
keyboard_layout.h
keyboard_layout_switching.cpp
keyboard_layout_switching.h Run clang-tidy with modernize-use-override check 5 years ago
keyboard_repeat.cpp
keyboard_repeat.h
killwindow.cpp
killwindow.h
kwin.kcfg Remove Client fullscreen hack 5 years ago
kwin.notifyrc SVN_SILENT made messages (.desktop file) - always resolve ours 5 years ago
kwinbindings.cpp Use new slot syntax in Compositor class 5 years ago
layers.cpp Port away from deprecated headers 5 years ago
logind.cpp remove superfluous code 6 years ago
logind.h Run clang-tidy with modernize-use-override check 5 years ago
main.cpp Port away from deprecated headers 5 years ago
main.h Run clang-tidy with modernize-use-override check 5 years ago
main_wayland.cpp Forward and log exit code of the nested process 5 years ago
main_wayland.h Run clang-tidy with modernize-use-override check 5 years ago
main_x11.cpp Don't use deprecated toAscii() method 5 years ago
main_x11.h Run clang-tidy with modernize-use-override check 5 years ago
manage.cpp Remove Client fullscreen hack 5 years ago
modifier_only_shortcuts.cpp
modifier_only_shortcuts.h
moving_client_x11_filter.cpp Use more accurate name for Workspace::getMovingClient method 5 years ago
moving_client_x11_filter.h
netinfo.cpp Support NET_WM_STATE_FOCUSED 5 years ago
netinfo.h Run clang-tidy with modernize-use-override check 5 years ago
onscreennotification.cpp
onscreennotification.h
options.cpp Don't use deprecated toAscii() method 5 years ago
options.h Run clang-tidy with modernize-use-override check 5 years ago
org.kde.KWin.VirtualDesktopManager.xml
org.kde.KWin.xml Add a dbus method getWindowInfo returning same data as queryWindowInfo 6 years ago
org.kde.kappmenu.xml
org.kde.kwin.ColorCorrect.xml
org.kde.kwin.Compositing.xml
org.kde.kwin.Effects.xml
org.kde.kwin.OrientationSensor.xml
orientation_sensor.cpp Initialise the orientation sensor at start 5 years ago
orientation_sensor.h Run clang-tidy with modernize-use-override check 5 years ago
osd.cpp
osd.h
outline.cpp [wayland] Make sure that only the fading popups effect animates outline 6 years ago
outline.h Run clang-tidy with modernize-use-override check 5 years ago
outputscreens.cpp Refactor getters in OutputScreens 5 years ago
outputscreens.h Run clang-tidy with modernize-use-override check 5 years ago
overlaywindow.cpp
overlaywindow.h
placement.cpp Port away from deprecated headers 5 years ago
placement.h Overhaul doxygen comments 6 years ago
platform.cpp Send axis_source, axis_discrete, and axis_stop 5 years ago
platform.h Run clang-tidy with modernize-use-override check 5 years ago
pointer_input.cpp Send axis_source, axis_discrete, and axis_stop 5 years ago
pointer_input.h Run clang-tidy with modernize-use-override check 5 years ago
popup_input_filter.cpp
popup_input_filter.h
rootinfo_filter.cpp
rootinfo_filter.h
rules.cpp Make sure we don't resize clients before they've been set up 5 years ago
rules.h Run clang-tidy with modernize-use-override check 5 years ago
scene.cpp Verify that there is no scene windows when Scene is about to be destroyed 6 years ago
scene.h Run clang-tidy with modernize-use-override check 5 years ago
screenedge.cpp Port away from QRegion::rects 5 years ago
screenedge.h Run clang-tidy with modernize-use-override check 5 years ago
screenlockerwatcher.cpp Close screen grabbing effect when screensaver starts 5 years ago
screenlockerwatcher.h Run clang-tidy with modernize-use-override check 5 years ago
screens.cpp Remove BasicScreens class 5 years ago
screens.h Run clang-tidy with modernize-use-override check 5 years ago
settings.kcfgc
shadow.cpp Avoid crash without XWayland 5 years ago
shadow.h Run clang-tidy with modernize-use-override check 5 years ago
shell_client.cpp Port away from deprecated headers 5 years ago
shell_client.h Run clang-tidy with modernize-use-override check 5 years ago
shortcutdialog.ui
sm.cpp Port away from deprecated headers 5 years ago
sm.h Run clang-tidy with modernize-use-override check 5 years ago
tabgroup.cpp
tabgroup.h Overhaul doxygen comments 6 years ago
tabletmodemanager.cpp Make it possible to autodetect the tablet mode 6 years ago
tabletmodemanager.h Run clang-tidy with modernize-use-override check 5 years ago
thumbnailitem.cpp Remove Compositor created check 5 years ago
thumbnailitem.h Run clang-tidy with modernize-use-override check 5 years ago
toplevel.cpp Port away from QRegion::rects 5 years ago
toplevel.h Run clang-tidy with modernize-use-override check 5 years ago
touch_hide_cursor_spy.cpp
touch_hide_cursor_spy.h
touch_input.cpp
touch_input.h Run clang-tidy with modernize-use-override check 5 years ago
udev.cpp [platform/virtual] Drop support for vgem and rendernode 6 years ago
udev.h [platform/virtual] Drop support for vgem and rendernode 6 years ago
unmanaged.cpp Move Unmanaged-specific hack away from Toplevel::setupCompositing 6 years ago
unmanaged.h Run clang-tidy with modernize-use-override check 5 years ago
useractions.cpp [colorcorrection] Introduce toggle Night Color shortcut 5 years ago
useractions.h Run clang-tidy with modernize-use-override check 5 years ago
utils.cpp Port away from deprecated headers 5 years ago
utils.h Run clang-tidy with modernize-use-override check 5 years ago
virtual_terminal.cpp Port away from deprecated headers 5 years ago
virtual_terminal.h Run clang-tidy with modernize-use-override check 5 years ago
virtualdesktops.cpp Send done event after the number of rows has been changed 6 years ago
virtualdesktops.h Run clang-tidy with modernize-use-override check 5 years ago
virtualdesktopsdbustypes.cpp
virtualdesktopsdbustypes.h
virtualkeyboard.cpp Fix crash on closing 6 years ago
virtualkeyboard.h Run clang-tidy with modernize-use-override check 5 years ago
virtualkeyboard_dbus.cpp
virtualkeyboard_dbus.h Run clang-tidy with modernize-use-override check 5 years ago
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 5 years ago
wayland_server.cpp Implement the keystate protocol 5 years ago
wayland_server.h Run clang-tidy with modernize-use-override check 5 years ago
window_property_notify_x11_filter.cpp
window_property_notify_x11_filter.h
workspace.cpp Don't crash when highlighted tabbox client is closed 5 years ago
workspace.h Run clang-tidy with modernize-use-override check 5 years ago
x11eventfilter.cpp
x11eventfilter.h Overhaul doxygen comments 6 years ago
xcbutils.cpp Don't call << in a temporary vector 5 years ago
xcbutils.h Port away from QRegion::rects 5 years ago
xkb.cpp
xkb.h Run clang-tidy with modernize-use-override check 5 years ago
xkb_qt_mapping.h

README.md

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.