[Git][wxwidgets/wxwidgets][master] Fix non-resizable TLW size on GTK when client size is set to initial size

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
May 19, 2026, 3:51:31 PMMay 19
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • af199c40
    by Paul Cornett at 2026-05-19T12:30:22-07:00
    Fix non-resizable TLW size on GTK when client size is set to initial size
    
    See #26480
    

1 changed file:

Changes:

  • src/gtk/toplevel.cpp
    ... ... @@ -1437,6 +1437,8 @@ void wxTopLevelWindowGTK::DoSetClientSize(int width, int height)
    1437 1437
     
    
    1438 1438
         if (m_wxwindow)
    
    1439 1439
         {
    
    1440
    +        DoGetClientSize(&width, &height);
    
    1441
    +
    
    1440 1442
             // If window is not resizable or not yet shown, set size request on
    
    1441 1443
             // client widget, to make it more likely window will get correct size
    
    1442 1444
             // even if our decorations size cache is incorrect (as it will be before
    
    ... ... @@ -1444,11 +1446,11 @@ void wxTopLevelWindowGTK::DoSetClientSize(int width, int height)
    1444 1446
             if (!gtk_window_get_resizable(GTK_WINDOW(m_widget)))
    
    1445 1447
             {
    
    1446 1448
                 gtk_widget_set_size_request(m_widget, -1, -1);
    
    1447
    -            gtk_widget_set_size_request(m_wxwindow, m_clientWidth, m_clientHeight);
    
    1449
    +            gtk_widget_set_size_request(m_wxwindow, width, height);
    
    1448 1450
             }
    
    1449 1451
             else if (!IsShown())
    
    1450 1452
             {
    
    1451
    -            gtk_widget_set_size_request(m_wxwindow, m_clientWidth, m_clientHeight);
    
    1453
    +            gtk_widget_set_size_request(m_wxwindow, width, height);
    
    1452 1454
                 // Cancel size request at next idle to allow resizing
    
    1453 1455
                 g_idle_add_full(G_PRIORITY_LOW - 1, reset_size_request, m_wxwindow, nullptr);
    
    1454 1456
                 g_object_ref(m_wxwindow);
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help Notification message regarding https://gitlab.com/wxwidgets/wxwidgets/-/commit/af199c40f9511663f2ae6b1dff6bda296c356c5e at 1779220288

Reply all
Reply to author
Forward
0 new messages