D26828: Refactor geometry constraints code

Vlad Zahorodnii <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.