kwin/plugins/platforms/x11/standalone
Vlad Zahorodnii 84d75cb567 [x11] Add support for _GTK_FRAME_EXTENTS
Summary:
KDE is known for having a strong view on the client-side decorations vs
server-side decorations issue. The main argument raised against CSD is
that desktop will look less consistent when clients start drawing window
decorations by themselves, which is somewhat true. It all ties to how
well each toolkit is integrated with the desktop environment.

KDE doesn't control the desktop market on Linux. Another big "player"
is GNOME. Both KDE and GNOME have very polarized views on in which
direction desktop should move forward. The KDE community is pushing more
toward server-side decorations while the GNOME community is pushing
more toward client-side decorations. Both communities have developed
great applications and it's not rare to see a GNOME application being
used in KDE Plasma. The only problem is that these different views are
not left behind the curtain and our users pay the price. Resizing GTK
clients in Plasma became practically impossible due to resize borders
having small hit area.

When a client draws its window decoration, it's more likely that it also
draws the drop-shadow around the decoration. The compositor must know
the extents of the shadow so things like snapping and so on work as
expected. And here lies the problem... While the xdg-shell protocol has
a way to specify such things, the NetWM spec doesn't have anything like
that. There's _GTK_FRAME_EXTENTS in the wild, however the problem with
it is that it's a proprietary atom, which is specific only to GTK apps.

Due to that, _GTK_FRAME_EXTENTS wasn't implemented because implementing
anything like that would require major changes in how we think about
geometry.

Recent xdg-shell window geometry patches adjusted geometry abstractions
in kwin to such a degree that it's very easy to add support for client
side decorated clients on X11. We just have to make sure that the
X11Client class provides correct buffer geometry and frame geometry when
the gtk frame extents are set.

Even though the X11 code is feature frozen, I still think it's worth
to have _GTK_FRAME_EXTENTS support in kwin because it will fix the resize
issues. Also, because KWin/Wayland is unfortunately far from becoming
default, it will help us with testing some implementation bits of the
window geometry from xdg-shell.

BUG: 390550
FIXED-IN: 5.18.0

Test Plan:
Things like quick tiling, maximizing, tiling scripts and so on work as
expected with GTK clients.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: cblack, trmdi, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24660
2019-11-27 14:12:30 +02:00
..
CMakeLists.txt [libkwineffects] Introduce API to easily show a QtQuick scene in an effect 2019-09-27 16:11:05 +01:00
edge.cpp
edge.h
effects_mouse_interception_x11_filter.cpp [effects] fix mouse wheel detection 2019-11-15 14:10:03 +00:00
effects_mouse_interception_x11_filter.h
effects_x11.cpp
effects_x11.h
glx_context_attribute_builder.cpp
glx_context_attribute_builder.h
glxbackend.cpp [x11] Add support for _GTK_FRAME_EXTENTS 2019-11-27 14:12:30 +02:00
glxbackend.h Remove vsync detection and configurability 2019-11-14 08:55:08 +01:00
logging.cpp
logging.h
non_composited_outline.cpp
non_composited_outline.h
overlaywindow_x11.cpp
overlaywindow_x11.h
screenedges_filter.cpp
screenedges_filter.h
screens_xrandr.cpp
screens_xrandr.h
sync_filter.cpp
sync_filter.h
windowselector.cpp
windowselector.h
x11.json
x11_decoration_renderer.cpp
x11_decoration_renderer.h
x11_output.cpp
x11_output.h
x11_platform.cpp
x11_platform.h
x11cursor.cpp
x11cursor.h
xfixes_cursor_event_filter.cpp
xfixes_cursor_event_filter.h
xinputintegration.cpp
xinputintegration.h