https://bugs.kde.org/show_bug.cgi?id=359764

--- Comment #11 from David Edmundson <k...@davidedmundson.co.uk> ---
Not working in xmonad:

WM_NORMAL_HINTS(WM_SIZE_HINTS):
        user specified location: 365, 0
        user specified size: 1555 by 28
        program specified minimum size: 1607 by 28
        program specified maximum size: 1607 by 28
        window gravity: Static

Not working in xmonad:
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        user specified location: 312, 0
        user specified size: 1608 by 28
        program specified minimum size: 1608 by 28
        program specified maximum size: 1608 by 28
        window gravity: Static


Looks like I skip a resize as I set the min/max and assume it will then resize
implicitly. 
(which a working WM would do)

If someone wants to make a patch, you'll need to adjust PanelView::resizePanel
so that resize() keeps it *also* within minimumSize() and maximiumSize()

can someone replace their panelsize::resizePanel() method to this:

void PanelView::resizePanel()
{
    QSize userSize;
    if (formFactor() == Plasma::Types::Vertical) {
        const int minSize = qMax(MINSIZE, m_minLength);
        const int maxSize = qMin(m_maxLength, screen()->size().height() -
m_offset);
        setMinimumSize(QSize(thickness(), minSize));
        setMaximumSize(QSize(thickness(), maxSize));
        userSize = QSize(thickness(), qBound(minSize, m_contentLength,
maxSize));
    } else {
        const int minSize = qMax(MINSIZE, m_minLength);
        const int maxSize = qMin(m_maxLength, screen()->size().width() -
m_offset);
        setMinimumSize(QSize(minSize, thickness()));
        setMaximumSize(QSize(maxSize, thickness()));
        userSize = QSize(qBound(minSize, m_contentLength, maxSize),
thickness());
    }
    resize(userSize.expandedTo(minimumSize()).boundTo(maximiumSize()));
    //positionPanel will be called implicitly from resizeEvent
}

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to