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
This commit is contained in:
@@ -1221,11 +1221,8 @@ void wxTopLevelWindowGTK::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXU
|
|||||||
void wxTopLevelWindowGTK::GTKDoGetSize(int *width, int *height) const
|
void wxTopLevelWindowGTK::GTKDoGetSize(int *width, int *height) const
|
||||||
{
|
{
|
||||||
wxSize size(m_width, m_height);
|
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.x < 0) size.x = 0;
|
||||||
if (size.y < 0) size.y = 0;
|
if (size.y < 0) size.y = 0;
|
||||||
if (width) *width = size.x;
|
if (width) *width = size.x;
|
||||||
|
|||||||
Reference in New Issue
Block a user