update max. constrains with the aspect setting
complements ff1e4e72efed8ec44abe877ac00bbdede48902d5 REVIEW: 108704
This commit is contained in:
parent
092c80a537
commit
5404c7f9b4
1 changed files with 3 additions and 0 deletions
|
@ -1390,6 +1390,7 @@ QSize Client::sizeForClientSize(const QSize& wsize, Sizemode mode, bool noframe)
|
||||||
void Client::getWmNormalHints()
|
void Client::getWmNormalHints()
|
||||||
{
|
{
|
||||||
long msize;
|
long msize;
|
||||||
|
const bool hadFixedAspect = xSizeHint.flags & PAspect;
|
||||||
if (XGetWMNormalHints(display(), window(), &xSizeHint, &msize) == 0)
|
if (XGetWMNormalHints(display(), window(), &xSizeHint, &msize) == 0)
|
||||||
xSizeHint.flags = 0;
|
xSizeHint.flags = 0;
|
||||||
// set defined values for the fields, even if they're not in flags
|
// set defined values for the fields, even if they're not in flags
|
||||||
|
@ -1423,6 +1424,8 @@ void Client::getWmNormalHints()
|
||||||
// no dividing by zero
|
// no dividing by zero
|
||||||
xSizeHint.min_aspect.y = qMax(xSizeHint.min_aspect.y, 1);
|
xSizeHint.min_aspect.y = qMax(xSizeHint.min_aspect.y, 1);
|
||||||
xSizeHint.max_aspect.y = qMax(xSizeHint.max_aspect.y, 1);
|
xSizeHint.max_aspect.y = qMax(xSizeHint.max_aspect.y, 1);
|
||||||
|
if (!hadFixedAspect)
|
||||||
|
maximize(max_mode); // align to eventual new contraints
|
||||||
} else {
|
} else {
|
||||||
xSizeHint.min_aspect.x = 1;
|
xSizeHint.min_aspect.x = 1;
|
||||||
xSizeHint.min_aspect.y = INT_MAX;
|
xSizeHint.min_aspect.y = INT_MAX;
|
||||||
|
|
Loading…
Reference in a new issue