Skip setting geometry hints for non resizeable windows in wxGTK
Avoid calling gtk_window_set_geometry_hints() when the window can't be resized anyhow, this doesn't seem to be necessary and results in warnings like the following when using Gnome: gnome-session[xxx]: Window manager warning: Window 0xxxx (Minimal wx) sets an MWM hint indicating it isn't resizable, but sets min size 198 x 154 and max size 268435454 x 268435454; this doesn't make much sense. Closes https://github.com/wxWidgets/wxWidgets/pull/529
This commit is contained in:
parent
7e80ff4ed8
commit
a11e09fb11
@ -1238,6 +1238,17 @@ void wxTopLevelWindowGTK::DoSetSizeHints( int minW, int minH,
|
||||
int incW, int incH )
|
||||
{
|
||||
base_type::DoSetSizeHints(minW, minH, maxW, maxH, incW, incH);
|
||||
|
||||
if (!HasFlag(wxRESIZE_BORDER))
|
||||
{
|
||||
// It's not useful to set size hints for the windows which can't be
|
||||
// resized anyhow, and it even results in warnings from Gnome window
|
||||
// manager, so just don't do it (but notice that it's not an error to
|
||||
// call this for non-resizeable windows, e.g. because it's done
|
||||
// implicitly by SetSizerAndFit() which is useful even in this case).
|
||||
return;
|
||||
}
|
||||
|
||||
m_incWidth = incW;
|
||||
m_incHeight = incH;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user