[Bug 150772] KMainWindow size restoring is broken wrt to maximization

Armin Berres trigger at space-based.de
Wed Feb 13 02:36:19 CET 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=150772         




------- Additional Comments From trigger space-based de  2008-02-13 02:36 -------
I spent some hours with debugging this issue. I still don't understand completely what's going on, but let me elaborate: 
When the window was maximized when it was closed, KMainWindow::restoreWindowSize(..) not set a window size, but it calls KWindowSystem::setState( winId(), state ) with "state = NET::MaxHoriz | NET::MaxVert". KWindowSystem::setState(..) then calls NETWinInfo::setState( state, state ) which will call XChangeProperty(..). Afterwards _NET_WM_STATE_MAXIMIZED_VERT and _NET_WM_STATE_MAXIMIZED_HORZ of the window will be set, but the size isn't changed. Why? I don't know. Is this a feature of XChangeProperty(..) which just sets the flags, but doesn't resize the window?
Anyway, setting the window size in KMainWindow::restoreWindowSize(..) to the desktop size solves the problem. The window behaves as expected. Find the simple patch attached. As I said I don't know, it the behaviour of KWindowSystem::setState(..) and everything it calls is the way it has to be, that's why the real solution may be something else...

The patch is at least a workaround for a very very nasty bug.


More information about the Kdelibs-bugs mailing list