Page 1 of 1

wxFrame::IsMaximized does not work on Unix platforms

Posted: Thu Jan 15, 2015 3:16 am
by lollisoft
Hi,

I am using wxGTK on openSuSE 13.1. My application tries to keep maximized if the user has maximized it. This works on wxMac (Mac OS X 10.5/10.6) and wxMSW (Win7/WinXP). Other platforms are Debian Linux and Solaris.

On the wxGTK version I am unable to keep this state, because the wxFrame::IsMaximized always returns false. I do maximize the frame with the system buttons that are available. I have experienced this behaviour on Solaris,
openSuSE, Debian and also on some remote X Servers.

Is this a known issue?

Is there a workaround - for sample capture these event's and keep my own state?

Thanks, Lothar

Re: wxFrame::IsMaximized does not work on Unix platforms

Posted: Fri Jan 16, 2015 1:01 am
by Manolo
I don't see why IsMaximized fails. I can only find this fixed bug: http://trac.wxwidgets.org/ticket/14052
It was fixed in wx 2.9.3 and your are using 2.8.12...

Re: wxFrame::IsMaximized does not work on Unix platforms

Posted: Fri Jan 16, 2015 9:59 am
by DavidHart
Hi,

I tested this on debian wheezy using a self-built wxGTK-2.8.12, and I can't reproduce the behaviour you found.

I changed the 'minimal' sample (that comes with the wx source) by replacing the 'About' dialog messagebox with the following:

Code: Select all

    wxMessageBox(wxString::Format( wxT("IsMaximised is %s"), IsMaximized() ? wxT("true"):wxT("false")),
                 wxT("About wxWidgets minimal sample"),
                 wxOK | wxICON_INFORMATION,
                 this);
and fired 'About' when Maximised and Restored. It gave the expected answers.

Does this work for you too? If not, perhaps it's to do with your DE (I tested using kde).

If it does work for you, how does your code differ?

Regards,

David

Re: wxFrame::IsMaximized does not work on Unix platforms

Posted: Sat Jan 17, 2015 11:06 am
by lollisoft
Hi,

I have tested my software against a openSuSE installation without using a ssh shell (-X). On a local Gnome based session IsMaximized() works.

So it is only appearing to a remote X session.

Thanks, Lothar