Bug 72387 - Saving window sizes seem to produce wrong results.
Summary: Saving window sizes seem to produce wrong results.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-11 12:52 UTC by Thomas Zander
Modified: 2004-01-12 17:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander 2004-01-11 12:52:51 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

If I make a window vertically maximized on applcations that allow to save their window size the window is not opened with the correct sizing.

For example a konsole; open it, make it about 3/4 screenWidth and make it vertically maximized (MMB on maximize button).
Then save settings (in settings->save as default)
Looking in the konsolerc, the sizes are saved correctly.

Then I start konsole and the window is only 642 pixels wide while the config asked it to be 790

Same problem appears in kmail, but you don't have to manually save the posiitons.

Don't know if its relevant; but I have a xinerama setup here..
Comment 1 Lubos Lunak 2004-01-12 17:20:52 UTC
Subject: kdelibs/kdeui

CVS commit by lunakl: 

Fix a lame mistake and a lame mistake.
CCMAIL: 72387-done@bugs.kde.org


  M +4 -4      kmainwindow.cpp   1.124


--- kdelibs/kdeui/kmainwindow.cpp  #1.123:1.124
@@ -878,10 +878,10 @@ void KMainWindow::restoreWindowSize( KCo
             int state = ( size.width() > desk.width() ? NET::MaxHoriz : 0 )
                         | ( size.height() > desk.height() ? NET::MaxVert : 0 );
-            if( state & NET::Max )
+            if(( state & NET::Max ) == NET::Max )
                 ; // no resize
-            else if( state & NET::MaxHoriz )
+            else if(( state & NET::MaxHoriz ) == NET::MaxHoriz )
                 resize( width(), size.height());
-            else if( state & NET::MaxVert )
-                resize( size.height(), height());
+            else if(( state & NET::MaxVert ) == NET::MaxVert )
+                resize( size.width(), height());
             else
                 resize( size );