D24660: [x11] Add support for _GTK_FRAME_EXTENTS

Vlad Zahorodnii noreply at phabricator.kde.org
Tue Oct 15 11:41:49 BST 2019


zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION 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.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D24660

AFFECTED FILES
  abstract_client.cpp
  abstract_client.h
  atoms.cpp
  atoms.h
  events.cpp
  geometry.cpp
  manage.cpp
  netinfo.cpp
  plugins/platforms/x11/standalone/glxbackend.cpp
  toplevel.cpp
  x11client.cpp
  x11client.h

To: zzag, #kwin
Cc: kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20191015/1812a33f/attachment-0001.html>


More information about the kwin mailing list