Minimum window size isn't always respected with BoxSizers on Cygwin (regression) (Issue #26699)

21 views
Skip to first unread message

Hamish Mcintyre-Bhatty

unread,
Jul 15, 2026, 12:43:59 PM (2 days ago) Jul 15
to wx-...@googlegroups.com, Subscribed
hamishmb created an issue (wxWidgets/wxWidgets#26699)

Description

Bug description:

Minimum window size isn't being respected if the panel for a frame has the main box sizer set and fit to it, even when SetMinSize() and SetSizeHints() are used for the sizer. This is a regression in 3.1.5 (I haven't been able to build newer versions of wxWidgets on Cygwin yet to determine if the problem has gone away in a later build), and doesn't occur on 3.0.5, and I can confirm this issue affects Cygwin only, and not Linux or macOS (though I haven't tested native Windows builds, as I don't use them).

Please note, there are some minimal patches that Cygwin needs for wxWidgets that haven't been upstreamed yet. These can be found at: https://gitlab.com/hamishmb/cygwin-wxwidgets3.0 and https://gitlab.com/hamishmb/cygwin-wxwidgets3.1

I'm about to start work on bisecting this issue in the hope of creating a patch for Cygwin that reverts whatever is problematic, but I'd like some upstream support too if possible, hence me creating this report. I know it's not very helpful that I can't currently test against newer versions of wxWidgets, but I do hope to do this soon, when I have some time and energy for it, in amongst all the other things that need to get done.

Expected vs observed behaviour:

Box sizers respect the minimum size on both wxWidgets 3.0.5 and 3.1.5 on Cygwin, like they do on Linux.

Stack trace:

No crash or assert failure, so N/A.

Patch or snippet allowing to reproduce the problem:

test.cpp Example, adapted from the box sizer example in the documentation. Please note, I am not a C++ developer by any stretch, so I may have messed something up here, but it does seem to demonstrate the regression.

test.py wxPython equivalent example, run with wxPython 4.0.7 and 4.1.1 Cygwin packages for Python 3.8 and 3.9 (respectively) to see the problem using wxPython.

To Reproduce:

Steps to reproduce the behaviour, please make them as detailed as possible.
For example:

  1. Install Cygwin from cygwin.org, and install the libwx_baseu3.0-devel, libwx_baseu3.1-devel, libwx_gtk3u3.0-devel, libwx_gtk3u3.1-devel, gcc-g++ and xinit packages, which should automatically pull in the rest of the dependencies.
  2. Download test.cpp.
  3. Open a Cygwin64 terminal.
  4. Run startxwin &
  5. cd to the directory you downloaded test.cpp to, for example /cygdrive/c/Users/Hamish/Downloads
  6. Compile it for wxWidgets 3.0.5 by running: "g++ test.cpp wx-config-3.0 --cxxflags --libs std"
  7. Run DISPLAY=:0 ./a.exe and observe that the window cannot be resized below the minimum size.
  8. Close it and compile against wxWidgets 3.1.5 by running "g++ test.cpp wx-config-3.1 --cxxflags --libs std"
  9. Run DISPLAY=:0 ./a.exe and observe that under wxWidgets 3.1.5 the minimum window size isn't being respected.

Platform and version information

  • wxWidgets version you use: 3.1.5 and 3.0.5
  • wxWidgets port you use: wxGTK
  • OS and its version: Windows 11 (but also affects 10 and 8.1, as Cygwin also supports those)
    • GTK version: 3.24.52
    • Which GDK backend is used: X11
    • Desktop environment : None
    • Current theme: GTK default, but not relevant.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26699@github.com>

Hamish Mcintyre-Bhatty

unread,
Jul 15, 2026, 1:09:25 PM (2 days ago) Jul 15
to wx-...@googlegroups.com, Subscribed
hamishmb left a comment (wxWidgets/wxWidgets#26699)

Unfortunately 3.0.5.1 no longer builds on Cygwin, so I am unable to try to bisect this at the moment. I guess that's the next thing to work on.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26699/4983312060@github.com>

Steve Cornett

unread,
Jul 15, 2026, 2:14:48 PM (2 days ago) Jul 15
to wx-...@googlegroups.com, Subscribed
stevecor left a comment (wxWidgets/wxWidgets#26699)

This issue was fixed in 3.1.6. More specifically, in 136574b.

You can build a newer wxWidgets release from sources. See MinGW Compilation. Note also that MSYS2 has newer wxWidgets releases.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26699/4983881364@github.com>

Steve Cornett

unread,
Jul 15, 2026, 9:58:03 PM (2 days ago) Jul 15
to wx-...@googlegroups.com, Subscribed
stevecor left a comment (wxWidgets/wxWidgets#26699)

I verified that fix using git bisect. This issue can be closed.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26699/4987339297@github.com>

paulcor

unread,
Jul 15, 2026, 11:41:10 PM (2 days ago) Jul 15
to wx-...@googlegroups.com, Subscribed

Closed #26699 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/26699/issue_event/28049161908@github.com>

Reply all
Reply to author
Forward
0 new messages