Hi, I just noticed that Compiz' window base size calculation in the function recalcNormalHints() is broken. If both PMinSize and PBaseSize are set, the base size is overwritten by the minimum size first and after that the minimum size is overwritten by the base size again. This leads to the base size information being completely lost. I have attached a patch which fixes this problem, however, I do not yet fully understand the idea behind the original code. Any objection against putting this patch in?
Regards, Danny
diff --git a/src/window.c b/src/window.c index 6e18579..6265edb 100644 --- a/src/window.c +++ b/src/window.c @@ -117,30 +117,18 @@ recalcNormalHints (CompWindow *window) window->sizeHints.width = window->serverWidth; window->sizeHints.height = window->serverHeight; - if (window->sizeHints.flags & PMinSize) - { - window->sizeHints.base_width = window->sizeHints.min_width; - window->sizeHints.base_height = window->sizeHints.min_height; - } - else + if (!(window->sizeHints.flags & PMinSize)) { window->sizeHints.base_width = 0; window->sizeHints.base_height = 0; + window->sizeHints.flags |= PMinSize; } - window->sizeHints.flags |= PBaseSize; - - if (window->sizeHints.flags & PBaseSize) - { - window->sizeHints.min_width = window->sizeHints.base_width; - window->sizeHints.min_height = window->sizeHints.base_height; - } - else + if (!(window->sizeHints.flags & PBaseSize)) { window->sizeHints.min_width = 0; window->sizeHints.min_height = 0; } - window->sizeHints.flags |= PMinSize; if (!(window->sizeHints.flags & PMaxSize)) {
_______________________________________________ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz