My guess at what's happening here is that we've broken a hidden assumption there that any non-popup window must be user-resizable. My basis for that is that the documented meaning of
SM_CXMINTRACK says "The user cannot drag the window frame to a size smaller than these dimensions." I think it follows from there that a window which has no frame and which the user cannot resize should not be subject to this constraint, which means we are currently improperly applying it to most if not all dialog windows. Of course this has not been a problem before, because no other window is trying to be as narrow as this one.
So, what I'd like to try is to add one of two things on to the non-popup check: either also check that the window is not a dialog, or, if that would be too broad, check for some specific indicator that the window is user-resizable. For the second option my first thought is to check if the style
WS_SIZEBOX is set on the window. It would be better I think (as in, less likely to break something) if the widget object had a way to indicate this property itself, but I haven't found anything like that yet; we might end up having to add the kinds of things that we don't want to add.
I confirmed that adding either the dialog window type or the
WS_SIZEBOX check causes this window to get the correct size, but I haven't tried to find or analyze any regressions that may create (and I don't know the widget code well enough to be equipped to think of any).
(In reply to Mike Conley (:mconley) (:⚙️) (Extremely busy) from comment #3)
It looks like this
SM_CXMINTRACK value is supposed to be something that the client code can influence by handling the
WM_GETMINMAXINFO message - but that message only seems to be dispatched when the window is moved.
If we were getting that message (which I confirmed we are not), I think what it does is override what the windowing system uses as its own limits for a particular window; I wouldn't expect it to change the return value of
GetSystemMetrics. Since the limitation we're running up against is one we're imposing on ourselves, and not something that we're telling the windowing system we want it to do, I don't think this would affect anything we're interested in here.