wxFrame::IsMaximized does not work on Unix platforms

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
lollisoft
Earned some good credits
Earned some good credits
Posts: 115
Joined: Sat Jul 23, 2005 3:52 pm
Location: Germany
Contact:

wxFrame::IsMaximized does not work on Unix platforms

Post 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
OS: Windows 7, Mac OS X (Panther/Leopard/Snow Leopard), SuSE Linux, Debian (PPC), OpenMoko FreeRunner
Compiler: OpenWatcom, GCC
wxWidgets 2.8.x
IDE Makefile based.
RAD My own brewed, Code generation with XSLT and DialogBlocks
Manolo
Can't get richer than this
Can't get richer than this
Posts: 828
Joined: Mon Apr 30, 2012 11:07 pm

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

Post 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...
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

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

Post 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
lollisoft
Earned some good credits
Earned some good credits
Posts: 115
Joined: Sat Jul 23, 2005 3:52 pm
Location: Germany
Contact:

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

Post 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
OS: Windows 7, Mac OS X (Panther/Leopard/Snow Leopard), SuSE Linux, Debian (PPC), OpenMoko FreeRunner
Compiler: OpenWatcom, GCC
wxWidgets 2.8.x
IDE Makefile based.
RAD My own brewed, Code generation with XSLT and DialogBlocks
Post Reply