* Wed Oct 15 2008 Lukáš Tinkl <ltinkl@redhat.com> 4.1.2-5

- backport fix for faulty window resizing (kdebug:172042)
This commit is contained in:
Kevin Kofler 2008-10-15 15:25:51 +00:00
parent 88e65a714b
commit 40c1874118
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,55 @@
Index: kdeui/widgets/kmainwindow_p.h
===================================================================
--- kdeui/widgets/kmainwindow_p.h (revision 871464)
+++ kdeui/widgets/kmainwindow_p.h (revision 871465)
@@ -44,6 +44,7 @@
bool settingsDirty:1;
bool autoSaveWindowSize:1;
bool care_about_geometry:1;
+ bool sizeApplied:1;
bool shuttingDown:1;
KConfigGroup autoSaveGroup;
QTimer* settingsTimer;
Index: kdeui/widgets/kmainwindow.cpp
===================================================================
--- kdeui/widgets/kmainwindow.cpp (revision 871464)
+++ kdeui/widgets/kmainwindow.cpp (revision 871465)
@@ -284,6 +284,8 @@
dockResizeListener = new DockResizeListener(_q);
letDirtySettings = true;
+
+ sizeApplied = false;
}
static bool endsWithHashNumber( const QString& s )
@@ -677,6 +679,8 @@
bool KMainWindow::readPropertiesInternal( KConfig *config, int number )
{
+ K_D(KMainWindow);
+
if ( number == 1 )
readGlobalProperties( config );
@@ -691,6 +695,8 @@
if ( cg.hasKey(QLatin1String("ObjectName" )) )
setObjectName( cg.readEntry("ObjectName").toLatin1()); // latin1 is right here
+ d->sizeApplied = false; // since we are changing config file, reload the size of the window
+ // if necessary. Do it before the call to applyMainWindowSettings.
applyMainWindowSettings(cg); // Menubar, statusbar and toolbar settings.
s.setNum(number);
@@ -708,7 +714,10 @@
d->letDirtySettings = false;
- restoreWindowSize(cg);
+ if (!d->sizeApplied) {
+ restoreWindowSize(cg);
+ d->sizeApplied = true;
+ }
QStatusBar* sb = internalStatusBar(this);
if (sb) {

View File

@ -2,7 +2,7 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.1.2
Release: 4%{?dist}
Release: 5%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -80,6 +80,7 @@ Patch20: kdelibs-4.1.1-cmake.patch
## upstream patches
Patch100: kdelibs-4.1.2-googlemaps.patch
Patch101: kdelibs-4.1.2-kde#171870-kded-crash.patch
Patch102: kdelibs-4.1.3-kde#172042-windowsize.patch
BuildRequires: qt4-devel >= 4.4.0
Requires: qt4 >= %{_qt4_version}
@ -207,6 +208,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
## upstream patches
%patch100 -p0 -b .googlemaps
%patch101 -p0 -b .kde#171870-kded-crash
%patch102 -p0 -b .kde#172042-windowsize
%build
@ -367,6 +369,9 @@ rm -rf %{buildroot}
%changelog
* Wed Oct 15 2008 Lukáš Tinkl <ltinkl@redhat.com> 4.1.2-5
- backport fix for faulty window resizing (kdebug:172042)
* Mon Oct 13 2008 Than Ngo <than@redhat.com> 4.1.2-4
- backport patch to fix crash kded startup crash