#19134: Using wxNotebook with dev-latest and GTK3 always causes minimum TLW sizing
even if setting a larger initial window size with PersistenceManager or
explicit SetSize()
------------------------+--------------------
Reporter: jdagresta | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxGTK | Version: 3.1.4
Keywords: wxNotebook | Blocked By:
Blocking: | Patch: 0
------------------------+--------------------
Our application has a Dialog window that contains a wxNotebook (with a
number of wxPanel's) as well as a wxTextCtrl (message log window) to the
right of the wxNotebook and button areas above and below the wxNotebook.
Our application uses wxPeristenceManager to save/restore the last Dialog
window size.
When building our application on (Red Hat) Linux with wxWidgets 3.1.4 (or
dev-latest) and built for GTK3, the Dialog window "flashes" at the
appropriate saved window size (from Persistence Manager) but then always
resizes to the "minimum" size of the contained widgets (both horizontally
and vertically).
Also, even if the user then expands quite a bit the window size (both
horizontally and vertically) and then exits the Dialog, the Persistence
Manager is always saving the "minimum" dialog window size. Then we
manually edit the Width=/Height= values in the Persistence Manager save
file back to the much large sizes, but when re-starting the application
the same thing happens again - the dialog window "flashes" at the
specified size and then immediately shrinks down to the "minimum" size.
This problem happens with version 3.1.4 or dev-latest, but only if built
for GTK3 (--with-gtk3, which is the default). If we change to build with
GTK2 (--with-gtk2) this problem does not occur.
If we use wxWidgets version 3.0.5, this problem does not occur whether we
build with GTK2 or GTK3.
I've been able to reproduce the problem by making only a small change to
the notebook sample to effectively add a SetSize(900,600) call in OnInit()
to mimic what wxPersistenceManager is doing in our application.
Use the [[notebook_sample.patch]] attachment to modify the notebook
sample, and build the sample with wxWidgets 3.1.4 or dev-latest and built
for GTK3.
As soon as you run the `notebook` sample, you will see the problem.
In order to easily see this "initial sizing" problem with the modified
notebook sample, use appropriate large Width/Height values in the code
modifications according to the screen resolution being used for testing.
Details of our environment:
Red Hat Enterprise Linux Server release 7.9 (Maipo)
gtk2 version 2.24.31
gtk3 version_3.22.30
dev-latest we tested with was dated:_March 30, 2021
Screen Resolution: 1440 x 900
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/19134>