Version: (using KDE KDE 3.5.6) Installed from: Ubuntu Packages OS: Linux Our application is based on Qt. This occurs with both our Qt 4.1.4 based application version and our Qt 4.2.3 based application version. Our application starts with a QMainWindow-derived console window, which always displays with a Maximize button. When displaying on a system using KDE 3.1.3-6.10 Red Hat, windows that we bring up (all derived from QMainWindow) subsequent to the console window all have Maximize buttons. However, when displaying to a system using KDE 3.3.1-3.14 Red Hat, or KDE 3.5.6 (on a Ubuntu system), there is no Maximize button on any subsequent windows, and the Maximize menu entry for the window frame menu is grayed out. This is VERY annoying to our customers. I am not aware of anything we are doing that would prevent the Maximize button from appearing, and Trolltech knows of nothing we are doing that would do that either. If there is anything we can do to tell Kwin to add the Maximize button, please let us know. Also, if you could fix Kwin to work properly, we would really appreciate it.
Created attachment 21166 [details] picture showing missing maximize button This picture shows the missing maximize button on the window titled "/etc/motd".
Created attachment 21167 [details] picture showing expected behavior (KDE 3.1.3) This picture shows the Maximize button is there on the same window it is missing on in the other picture. This is the expected behavior that we get with KDE 3.1.3-6.10 Red Hat, and that we don't see with KDE 3.3.1 or 3.5.6.
In both attached pictures I am running the same version of our software, based on Qt 4.2.3, and running on a Solaris 8 system displaying to a VNC display running on a Linux system.
Please attach 'xprop' output for the window.
Created attachment 21173 [details] xprop output for KDE 3.1.3 xprop output for /etc/motd window displayed to KDE 3.1.3 desktop.
Created attachment 21174 [details] xprop output for KDE 3.5.6 xprop output for /etc/motd window displayed to KDE 3.5.6 desktop
Created attachment 21175 [details] code used to calculate max window size This is the portion of code used in our QMainWindow derived class for calculating the maximum window size.
Note that although the code included says "max window size can be full size of display", the logic actually maxes to the desktop availableGeometry area to ensure we don't make the window so large that the desktop toolbar hides part of the window.
xprop on the two desktops show that both desktops are 1024x768. Using xmag on the windows, I find that on the KDE 3.1.3 window the window frame is 20 pixels high on the top, 6 pixels wide on the right and left and 6 pixels high on the bottom. On the KDE 3.5.6 window, it's 23 pixels on top, and 4 pixels on the sides and bottom, so the max size calculation seems to be correct.
The area for maximizing windows is 1024x768, but the window requests smaller maximum size than that -> KWin will therefore not allow maximizing of the window. That is what you are doing to prevent the Maximize button from appearing. There is nothing in KWin to fix to work properly. I admit the window in this very specific case could actually fit, since the difference is exactly the border size, but since that can change dynamically, I don't find it worth the effort to do something about it just because you're trying to be smarter than the window manager. The fix for you is simple though - just drop the nonsensical maximum size, as there's no point in setting it (for example, what you say in comment #8 makes no sense, since maximum size has nothing to do with components of the desktop covering a window). If you for some reason need this for some broken window manager, I see in the code you have special cases for some window managers, so keep it just for those window managers (or alternatively opt out for window managers like KWin that can figure out the obvious on their own).
So although the maximum size of the window is as large as KDE would make it if there were a Maximize button, the Maximize button is not put on the window? That sounds like a bug to me. At the very least, it would be nice to have an option for KDE to put the Maximize button on a window regardless. Why is the window manager second-guessing the application? In any case, since I have a workaround to the KDE bug, I'll just leave it with these parting comments.
As already explained in the reply to your private mail, there is no bug and there is no point in adding a button that doesn't work. Also, it is your application second-guessing the window manager, not the other way around.