From 7ce4e521c5aa6ef8f6f23b1ea86f606fe23bdd20 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 14 Mar 2022 09:40:06 -0700 Subject: [PATCH] Fix a TLW sizing issue with Wayland Don't include the size of client side decorations when changing the size of a GtkWindow, as GTK will add in the decoration size itself. See #22141 --- src/gtk/toplevel.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 78899e93a7..944d61eb2e 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -1221,11 +1221,8 @@ void wxTopLevelWindowGTK::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXU void wxTopLevelWindowGTK::GTKDoGetSize(int *width, int *height) const { wxSize size(m_width, m_height); - if (!HasClientDecor(m_widget)) - { - size.x -= m_decorSize.left + m_decorSize.right; - size.y -= m_decorSize.top + m_decorSize.bottom; - } + size.x -= m_decorSize.left + m_decorSize.right; + size.y -= m_decorSize.top + m_decorSize.bottom; if (size.x < 0) size.x = 0; if (size.y < 0) size.y = 0; if (width) *width = size.x;