My KWIN fork where I work on features like per-output virtual desktops
Find a file
Vlad Zahorodnii 7120348932 Make checkWorkspacePosition() work without client geometry
A good portion of geometry handling code was written during the X11
times. The main difference between X11 and Wayland is that kwin doesn't
know where a window will exactly be after resize() or moveResize().

In order to handle Wayland specifics, every window has a bounding
geometry that is being manipulated by move(), resize(), and moveResize().
The frameGeometry(), the clientGeometry(), and the bufferGeometry() are
not manipulated by move(), resize(), and moveResize() directly. Almost
everything that manipulates geometry should use moveResizeGeometry().

This creates a problem though, since the clientGeometry() will be
updated only after the client provides a new buffer, kwin has absolutely
no idea what the client geometry for a given move resize geometry will
be.

Another side of the coin is that decoration updates are performed
asynchronously on wayland, meaning that you cannot use border properties
for anything related to geometry handling and you should avoid using
borderLeft(), borderTop(), borderRight(), and borderBottom() in general.

clientGeometry(), bufferGeometry(), and border*() are good only if you
want to forward an event or render something. They can't be used for
manipulating the geometry.

Unfortunately, AbstractClient::checkWorkspacePosition() needs both,
which is a bit of a problem. To add more oil to the fire, contents
of a decorated window can be snapped to a screen edge. This goes against
the nature of geometry updates on wayland, where we try to indicate
the bounds of the frame geometry and avoid using client and buffer
geometries.

In order to make geometry handling more correct on wayland, this change
removes the ability to snap the contents of a decorated window to a
screen edge. This allows to avoid using the client geometry in
checkWorkspacePosition(), which is a very important function that ensures
the window is inside the workspace.

There is nothing wrong with snapping the frame rather than its contents
and that's what kwin used to do. It was changed with the removal of
"Display borders on maximized windows" option, the relevant commit
didn't provide any reasoning behind the change.
2022-01-25 17:56:40 +00:00
autotests Move utils.h file to utils directory 2022-01-25 16:56:33 +00:00
cmake/modules Don't put a trailing dot in set_package_properties 2021-10-30 01:51:40 +03:00
data Remove Xrender backend 2021-06-09 11:21:57 +03:00
doc doc: modernise HACKING -> CONTRIBUTING guidelines and information 2021-08-31 22:10:58 +00:00
kconf_update effects: Enable the scale effect by default 2022-01-05 08:26:36 +00:00
LICENSES
src Make checkWorkspacePosition() work without client geometry 2022-01-25 17:56:40 +00:00
tests Move xcbutils to utils directory 2022-01-25 16:56:33 +00:00
.gitignore GIT_SILENT Add auto generated files to .gitignore 2021-05-03 14:58:25 +02:00
.gitlab-ci.yml Add GitLab CI 2021-11-27 03:10:09 +01:00
.kde-ci.yml autotests: Add breeze-icons to .kde-ci.yml 2021-11-29 11:44:24 +02:00
CMakeLists.txt Use not deprecated SYSTEMD_USER_UNIT_INSTALL_DIR 2022-01-18 07:03:45 +01:00
CONTRIBUTING.md doc: modernise HACKING -> CONTRIBUTING guidelines and information 2021-08-31 22:10:58 +00:00
KWinDBusInterfaceConfig.cmake.in Expose org.kde.kwin.ColorCorrect.xml dbus file 2022-01-05 01:33:01 +00:00
logo.png
Mainpage.dox
plasma-kwin_wayland.service.in Re-enable systemd managed kwin 2021-12-02 13:25:50 +00:00
plasma-kwin_x11.service.in [systemd] Fix X11 service file 2022-01-20 16:18:48 +00:00
README.md doc: modernise HACKING -> CONTRIBUTING guidelines and information 2021-08-31 22:10:58 +00: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.

Contributing to KWin

Please refer to the contributing document for everything you need to know to get started contributing to KWin.

Contacting KWin development team

  • mailing list: kwin@kde.org
  • IRC: #kde-kwin on irc.libera.chat

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.

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.