Diffusion KWin a75fb7f84ef4

Refactor geometry constraints code

Authored by zzag on Feb 12 2020, 10:38 AM.

Description

Refactor geometry constraints code

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.

Reviewers: KWin, davidedmundson

Reviewed By: KWin, davidedmundson

Subscribers: davidedmundson, romangg, kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D26828

Details

Committed
zzagFeb 28 2020, 3:13 PM
Reviewer
KWin
Differential Revision
D26828: Refactor geometry constraints code
Parents
R108:5b6e081af20e: [libinput] Send touch events with respect to device rotation
Branches
Unknown
Tags
Unknown