From 5404c7f9b4a6d46400160fae5da1872ffd38e45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Fri, 1 Feb 2013 19:42:42 +0100 Subject: [PATCH] update max. constrains with the aspect setting complements ff1e4e72efed8ec44abe877ac00bbdede48902d5 REVIEW: 108704 --- geometry.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/geometry.cpp b/geometry.cpp index 64b7e01a9f..0749f5d8a7 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1390,6 +1390,7 @@ QSize Client::sizeForClientSize(const QSize& wsize, Sizemode mode, bool noframe) void Client::getWmNormalHints() { long msize; + const bool hadFixedAspect = xSizeHint.flags & PAspect; if (XGetWMNormalHints(display(), window(), &xSizeHint, &msize) == 0) xSizeHint.flags = 0; // set defined values for the fields, even if they're not in flags @@ -1423,6 +1424,8 @@ void Client::getWmNormalHints() // no dividing by zero xSizeHint.min_aspect.y = qMax(xSizeHint.min_aspect.y, 1); xSizeHint.max_aspect.y = qMax(xSizeHint.max_aspect.y, 1); + if (!hadFixedAspect) + maximize(max_mode); // align to eventual new contraints } else { xSizeHint.min_aspect.x = 1; xSizeHint.min_aspect.y = INT_MAX;