It seems a lot of conditions have to be met for this:
- Running Linux (X11 in my case), though I haven't tested on other platforms.
- Using SetClientSize() just after setting the size using the constructor.
- Using wx.SIMPLE_BORDER as the style (or any style with a non-resizable border).
- Seems to happen more consistently on wxWidgets 3.1.x/wxPython 4.1.x than wxWidgets 3.0.x/wxPython 4.0.x.
- Commenting the call to SetClientSize immediately results in the expected behaviour.
I'm also going to note that the only reason I found this is that a while back, on certain platforms (probably macOS), I found it to be more reliable to call SetClientSize as well as setting the window size in the constructor. It may be the case that there is no need for this any more, but I figure I should report this anyway.
Has anyone else had this issue? Attached is a sample wxPython script that hopefully demonstrates the issue for others (uncomment the SetClientSize line to see it).