[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [PATCH] Restoring the mainwindow size
From:       Sean Harmer <sh () theharmers ! co ! uk>
Date:       2009-02-22 14:58:30
Message-ID: 200902221458.31091.sh () theharmers ! co ! uk
[Download RAW message or body]

Hi All,

Whilst tracking down the cause of the annoying bug

https://bugs.kde.org/show_bug.cgi?id=183285

I came across a small annoyance in kmainwindow that causes mainwindows to be 
set to their default width or height when the client application calls 
KMainWindow::restoreWindowSize( const KConfigGroup & config ).

As an example after fixing the above bug locally, I was still occasionally 
getting the main window of Kontact set to a width of 1800. This was only 
happening if kontact was maximised vertically.

The attached patch against kdeui (4.2 branch) fixes this problem. Is this OK 
to apply to the branch and trunk?

Kind regards,

Sean

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


["kmainwindow-restore-window-size.patch" (text/x-patch)]

Index: widgets/kmainwindow.cpp
===================================================================
--- widgets/kmainwindow.cpp	(revision 929807)
+++ widgets/kmainwindow.cpp	(working copy)
@@ -926,9 +926,9 @@
                 resize( desk.width(), desk.height() ); // WORKAROUND: this should \
                not be needed. KWindowSystem::setState
                                                        //             should be \
enough for maximizing. (ereslibre)  else if(( state & NET::MaxHoriz ) == \
                NET::MaxHoriz )
-                resize( desk.width(), height());
+                resize( desk.width(), size.height() );
             else if(( state & NET::MaxVert ) == NET::MaxVert )
-                resize( width(), desk.height());
+                resize( size.width(), desk.height() );
             else
                 resize( size );
             // QWidget::showMaximized() is both insufficient and broken



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic