My KWIN fork where I work on features like per-output virtual desktops
Find a file
Vlad Zahorodnii a75fb7f84e Refactor geometry constraints code
Summary:
Currently, there are a couple of issues with sizeForClientSize(). First
of all, we have a method called clientSizeToFrameSize() which does similar
thing except applying geometry constraints and checking window rules. The
other issue is that sizeForClientSize() is doing a bit too much, it checks
window rules, it applies a bunch of geometry constrains. Sometimes it
does not perform conversion between client sizes and frame sizes!

This change attempts to address those issues by replacing sizeForClientSize
with two similar methods and changing semantics of some methods of the
X11Client class.

The most significant difference between sizeForClientSize() and the new
methods is that neither constrainClientSize() nor constrainFrameSize()
check window rules. This is up to users of those methods. In many places,
we don't have to check window rules because we check isResizable(),
which returns false if the frame size is enforced by a window rule.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26828
2020-02-28 17:13:01 +02:00
autotests Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
cmake/modules Decode full monitor vendor name from EDID using hwdata 2020-02-26 12:37:11 +01:00
colorcorrection Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
data Cleanup style in CMakeLists.txt files 2019-09-17 16:03:05 +03:00
decorations Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
doc Remove the "Candy" category and fold its contents into "Appearance" 2020-02-25 11:26:27 -07:00
effects SVN_SILENT made messages (.desktop file) - always resolve ours 2020-02-28 05:55:39 +01:00
helpers Cleanup style in CMakeLists.txt files 2019-09-17 16:03:05 +03:00
kcmkwin Remove the "Candy" category and fold its contents into "Appearance" 2020-02-25 11:26:27 -07:00
kconf_update Fix kwin.upd not running if python 2 not installed 2020-01-27 16:11:46 +01:00
libinput [libinput] Send touch events with respect to device rotation 2020-02-28 19:56:55 +05:30
libkwineffects [libkwineffects] Set original backend framebuffer for render targets 2020-02-28 12:22:42 +00:00
platformsupport Revert "[platforms/x11] Remove triple buffering detection" 2020-01-16 10:00:20 +01:00
plugins [platforms/drm] Fix cursor output rotation 2020-02-28 19:48:43 +05:30
qml Cleanup style in CMakeLists.txt files 2019-09-17 16:03:05 +03:00
scripting [scripting] Expose Workspace::sendClientToDesktop() 2020-01-29 17:14:41 +02:00
scripts SVN_SILENT made messages (.desktop file) - always resolve ours 2020-01-29 09:28:27 +01:00
tabbox ScreenEdge: Do not use localtime for measuring duration 2020-02-03 12:26:17 +01:00
tests Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
xwl Port away from a deprecated signal 2020-01-25 23:13:53 +02:00
.arcconfig
.arclint
abstract_client.cpp Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
abstract_client.h Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
abstract_opengl_context_attribute_builder.cpp
abstract_opengl_context_attribute_builder.h
abstract_output.cpp Associate output transforms and orientations 2019-11-26 22:29:40 +01:00
abstract_output.h Associate output transforms and orientations 2019-11-26 22:29:40 +01:00
abstract_wayland_output.cpp Cache output transformation first 2020-02-28 12:22:42 +00:00
abstract_wayland_output.h [libinput] Send touch events with respect to device rotation 2020-02-28 19:56:55 +05:30
activation.cpp Drop some custom list typedefs 2019-11-27 15:54:08 +02:00
activities.cpp Drop some custom list typedefs 2019-11-27 15:54:08 +02:00
activities.h Rename Client to X11Client 2019-09-25 21:11:37 +03:00
appmenu.cpp Rename Client to X11Client 2019-09-25 21:11:37 +03:00
appmenu.h
atoms.cpp [x11] Add support for _GTK_FRAME_EXTENTS 2019-11-27 14:12:30 +02:00
atoms.h [x11] Add support for _GTK_FRAME_EXTENTS 2019-11-27 14:12:30 +02:00
client_machine.cpp Use nullptr everywhere 2019-09-19 17:48:21 +03:00
client_machine.h Use nullptr everywhere 2019-09-19 17:48:21 +03:00
CMakeLists.txt Decode full monitor vendor name from EDID using hwdata 2020-02-26 12:37:11 +01:00
composite.cpp Revert "Remove vsync detection and configurability" 2020-01-16 10:00:12 +01:00
composite.h Revert "[platforms/x11] Never block on retrace, always present after paint" 2020-01-16 10:00:08 +01:00
config-kwin.h.cmake Decode full monitor vendor name from EDID using hwdata 2020-02-26 12:37:11 +01:00
COPYING
cursor.cpp Use nullptr everywhere 2019-09-19 17:48:21 +03:00
cursor.h
dbusinterface.cpp Drop redundant Compositor::hasScene() 2019-09-07 10:19:04 +03:00
dbusinterface.h
debug_console.cpp Improve debug information on key events 2019-12-13 15:43:44 +01:00
debug_console.h Initial support for tablets on Wayland 2019-12-10 21:56:31 +01:00
debug_console.ui
deleted.cpp Drop Toplevel::decorationRect() 2020-01-29 12:58:54 +02:00
deleted.h Drop Toplevel::decorationRect() 2020-01-29 12:58:54 +02:00
effectloader.cpp
effectloader.h
effects.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
effects.h Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
egl_context_attribute_builder.cpp
egl_context_attribute_builder.h
events.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
fixqopengl.h
focuschain.cpp Use nullptr everywhere 2019-09-19 17:48:21 +03:00
focuschain.h Rename Client to X11Client 2019-09-25 21:11:37 +03:00
geometrytip.cpp Use nullptr everywhere 2019-09-19 17:48:21 +03:00
geometrytip.h
gestures.cpp
gestures.h
globalshortcuts.cpp
globalshortcuts.h
group.cpp Split group.cpp topic file 2019-12-03 19:43:47 +02:00
group.h Drop some custom list typedefs 2019-11-27 15:54:08 +02:00
HACKING.md Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
idle_inhibition.cpp Update my email address 2020-01-14 18:17:18 +02:00
idle_inhibition.h Update my email address 2020-01-14 18:17:18 +02:00
input.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
input.h Update my email address 2020-01-14 18:17:18 +02:00
input_event.cpp
input_event.h
input_event_spy.cpp Initial support for tablets on Wayland 2019-12-10 21:56:31 +01:00
input_event_spy.h Initial support for tablets on Wayland 2019-12-10 21:56:31 +01:00
internal_client.cpp Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
internal_client.h Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
keyboard_input.cpp Drop some custom list typedefs 2019-11-27 15:54:08 +02:00
keyboard_input.h
keyboard_layout.cpp Port away from a deprecated signal 2020-01-25 23:13:53 +02:00
keyboard_layout.h
keyboard_layout_switching.cpp
keyboard_layout_switching.h
keyboard_repeat.cpp
keyboard_repeat.h [wayland] Avoid compare to unintialised value in keyboard repeat 2019-09-23 22:13:54 +02:00
killwindow.cpp
killwindow.h
kwin.kcfg Load animation speed from new global animation speed controller 2019-09-25 14:37:01 +01:00
kwin.notifyrc SVN_SILENT made messages (.desktop file) - always resolve ours 2019-10-23 09:29:41 +02:00
kwinbindings.cpp Remove disabled TabGroup feature 2019-09-14 10:58:48 +02:00
KWinDBusInterfaceConfig.cmake.in
layers.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
linux_dmabuf.cpp Dmabuf recovery on EGL reset 2019-10-29 12:10:15 +01:00
linux_dmabuf.h Destroy dmabuf implementation on EGL backend going down 2019-11-30 15:47:14 +01:00
logind.cpp
logind.h
main.cpp Update my email address 2020-01-14 18:17:18 +02:00
main.h Fix crash in XRenderPictureData::~XRenderPictureData 2019-12-12 14:06:27 +02:00
main_wayland.cpp Don't notify ksplash in our wayland session 2019-09-23 22:13:43 +02:00
main_wayland.h
main_x11.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
main_x11.h Don't notify ksplash in our wayland session 2019-09-23 22:13:43 +02:00
Mainpage.dox
Messages.sh Extract messages from cpp files in colorcorrection/ 2020-01-12 21:24:17 +02:00
modifier_only_shortcuts.cpp
modifier_only_shortcuts.h
moving_client_x11_filter.cpp Rename Client to X11Client 2019-09-25 21:11:37 +03:00
moving_client_x11_filter.h
netinfo.cpp [x11] Add support for _GTK_FRAME_EXTENTS 2019-11-27 14:12:30 +02:00
netinfo.h Rename Client to X11Client 2019-09-25 21:11:37 +03:00
onscreennotification.cpp
onscreennotification.h
options.cpp Revert "Remove vsync detection and configurability" 2020-01-16 10:00:12 +01:00
options.h Revert "Remove vsync detection and configurability" 2020-01-16 10:00:12 +01:00
org.kde.kappmenu.xml
org.kde.kwin.ColorCorrect.xml [nightcolor] Expose transition timings to d-bus 2020-01-15 21:15:26 +02:00
org.kde.kwin.Compositing.xml
org.kde.kwin.Effects.xml
org.kde.kwin.OrientationSensor.xml
org.kde.KWin.Session.xml Port one of session management connections state to a custom API 2019-11-01 17:14:42 +00:00
org.kde.KWin.VirtualDesktopManager.xml
org.kde.KWin.xml
orientation_sensor.cpp Fix orientation sensor DBus 2019-09-01 16:15:25 +01:00
orientation_sensor.h Add some const & 2019-10-30 19:23:01 +01:00
osd.cpp
osd.h
outline.cpp
outline.h
outputscreens.cpp Associate output transforms and orientations 2019-11-26 22:29:40 +01:00
outputscreens.h Associate output transforms and orientations 2019-11-26 22:29:40 +01:00
overlaywindow.cpp
overlaywindow.h
placement.cpp Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
placement.h Delete unused forward declaration of Client class 2019-09-16 16:31:09 +03:00
platform.cpp Remove unused variable 2019-09-10 14:27:44 +02:00
platform.h Fix trivial Doxygen warning 2019-12-25 11:37:17 +02:00
pointer_input.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
pointer_input.h Update my email address 2020-01-14 18:17:18 +02:00
popup_input_filter.cpp Rename ShellClient to XdgShellClient 2019-09-23 17:28:56 +03:00
popup_input_filter.h Rename ShellClient to XdgShellClient 2019-09-23 17:28:56 +03:00
README.md
rootinfo_filter.cpp
rootinfo_filter.h
rules.cpp Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
rules.h Rename Client to X11Client 2019-09-25 21:11:37 +03:00
scene.cpp [x11] Fix visual artifacts during interactive resize 2020-02-03 13:56:35 +02:00
scene.h [x11] Fix visual artifacts during interactive resize 2020-02-03 13:56:35 +02:00
screenedge.cpp ScreenEdge: Do not use localtime for measuring duration 2020-02-03 12:26:17 +01:00
screenedge.h
screenlockerwatcher.cpp
screenlockerwatcher.h
screens.cpp Rename Client to X11Client 2019-09-25 21:11:37 +03:00
screens.h
settings.kcfgc
shadow.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
shadow.h Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
shortcutdialog.ui
sm.cpp Drop some custom list typedefs 2019-11-27 15:54:08 +02:00
sm.h Port one of session management connections state to a custom API 2019-11-01 17:14:42 +00:00
tablet_input.cpp Initial support for tablets on Wayland 2019-12-10 21:56:31 +01:00
tablet_input.h Initial support for tablets on Wayland 2019-12-10 21:56:31 +01:00
tabletmodemanager.cpp
tabletmodemanager.h
TESTING.md
thumbnailitem.cpp Rename Client to X11Client 2019-09-25 21:11:37 +03:00
thumbnailitem.h Use nullptr everywhere 2019-09-19 17:48:21 +03:00
toplevel.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
toplevel.h Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
touch_hide_cursor_spy.cpp
touch_hide_cursor_spy.h
touch_input.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
touch_input.h
udev.cpp
udev.h
unmanaged.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
unmanaged.h [wayland] Implement window geometry more properly 2019-11-27 14:12:30 +02:00
useractions.cpp Port away from a deprecated signal 2020-01-25 23:13:53 +02:00
useractions.h Rename Client to X11Client 2019-09-25 21:11:37 +03:00
utils.cpp Don't initialize QFlags<T> with nullptr 2019-09-19 21:42:34 +03:00
utils.h Delete class forward declarations in utils.h 2019-11-27 15:54:08 +02:00
virtual_terminal.cpp
virtual_terminal.h
virtualdesktops.cpp Add default shortcut to switch to the desktop to the left/right/top/bottom 2020-01-13 09:55:38 -07:00
virtualdesktops.h Add some const & 2019-10-30 19:23:01 +01:00
virtualdesktopsdbustypes.cpp
virtualdesktopsdbustypes.h
virtualkeyboard.cpp Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
virtualkeyboard.h
virtualkeyboard_dbus.cpp
virtualkeyboard_dbus.h
was_user_interaction_x11_filter.cpp
was_user_interaction_x11_filter.h
wayland_cursor_theme.cpp
wayland_cursor_theme.h
wayland_server.cpp Merge branch 'Plasma/5.17' 2019-11-18 12:27:17 +02:00
wayland_server.h Merge branch 'Plasma/5.17' 2019-10-29 12:12:02 +01:00
window_property_notify_x11_filter.cpp Rename Client to X11Client 2019-09-25 21:11:37 +03:00
window_property_notify_x11_filter.h
workspace.cpp Split geometry topic file 2020-01-16 12:22:21 +02:00
workspace.h Update my email address 2020-01-14 18:17:18 +02:00
x11client.cpp Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
x11client.h Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
x11eventfilter.cpp
x11eventfilter.h
xcbutils.cpp Use nullptr everywhere 2019-09-19 17:48:21 +03:00
xcbutils.h Adjust scene for client-side decorated clients 2019-11-27 14:12:30 +02:00
xdgshellclient.cpp Refactor geometry constraints code 2020-02-28 17:13:01 +02:00
xdgshellclient.h Revert "[kcm/effects] Clip ListView" 2020-02-22 11:53:59 +01:00
xkb.cpp Set Qt::KeypadModifier depending on current keysym 2019-12-30 14:41:26 +01:00
xkb.h Add some const & 2019-10-30 19:23:01 +01:00
xkb_qt_mapping.h Set Qt::KeypadModifier depending on current keysym 2019-12-30 14:41:26 +01:00

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.