Fix non-resizable TLW size on GTK when client size is set to initial size See #26480
| ... | ... | @@ -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