D26828: Refactor geometry constraints code

Vlad Zahorodnii noreply at phabricator.kde.org
Wed Jan 22 09:42:42 GMT 2020


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

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

REPOSITORY
  R108 KWin

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

AFFECTED FILES
  abstract_client.cpp
  abstract_client.h
  autotests/integration/xdgshellclient_test.cpp
  internal_client.cpp
  placement.cpp
  rules.cpp
  x11client.cpp
  x11client.h
  xdgshellclient.cpp

To: zzag
Cc: kwin, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 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/20200122/d8fc4cb0/attachment-0001.html>


More information about the kwin mailing list