From 60fd8c7a1b32a6ef685691994e77b0ac084456f8 Mon Sep 17 00:00:00 2001 From: Andreas Falkenhahn Date: Sun, 20 Mar 2016 15:48:52 +0100 Subject: [PATCH] Fix wrong TLW size with horizontal decorations in wxGTK Compare min/max width with m_width, not m_height, in GTKUpdateDecorSize() for the logic to work as expected. See #17455. (cherry picked from commit 0777bf6b92697d697bde7d8115340d499d1f85d9) --- src/gtk/toplevel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index a52dad0461..464fb3f0f8 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -1343,8 +1343,8 @@ void wxTopLevelWindowGTK::GTKUpdateDecorSize(const DecorSize& decorSize) { // if size hints match old size, assume hints were set to // maintain current client size, and adjust hints accordingly - if (m_minWidth == m_height) m_minWidth += diff.x; - if (m_maxWidth == m_height) m_maxWidth += diff.x; + if (m_minWidth == m_width) m_minWidth += diff.x; + if (m_maxWidth == m_width) m_maxWidth += diff.x; if (m_minHeight == m_height) m_minHeight += diff.y; if (m_maxHeight == m_height) m_maxHeight += diff.y; }