Bug 178191

Summary: [PATCH] Save/restore windows position
Product: [Unmaintained] kdelibs Reporter: Marino Sona <marainos>
Component: kdeuiAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: wishlist CC: finex, monipol
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: modified kmainwindow classes kmainwindow.tar.gz

Description Marino Sona 2008-12-19 16:59:09 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

I modified kmainwindow.cpp, kmainwindow.h and kmainwindow_p.h adding the option to automaticaly store and retreive windows position.
 
As stated in http://doc.trolltech.com/4.3/geometry.html#x11-peculiarities (also applies to qt 4.4 and 4.5), there's no simple fix for this problem. I simply added the code snippets suggested by qt developers.

I tested this patch in Kde 4.2 beta 2 (recompiled via kdesvn-build) on xubuntu 8.10 and it works..

To apply the patch:
copy these 3 files in <your kde-root src>/kdelibs/kdeui/widgets

To compile ONLY kdeui lib:
kdesvn-build kdelibs/kdeui --no-svn

Testing:

Recompile one simple app, like Tutorial03 (http://techbase.kde.org/Development/Tutorials/Using_KXmlGuiWindow).
Start kde4 and run Tutorial03 application. Window position get stored in your configrc in ~.kde4/share/config/tutorial03rc 

You should recompile all the other modules otherwise some program may crash, like konsole:
kdesvn-build --no-svn

I'm not a c++ guru so please test it... (win32/OSX too)
If you think it is ok i'd like see this patch integrated, because on a wide monitor it's a pain to rearrange all windows every time.
Comment 1 Marino Sona 2008-12-19 17:01:18 UTC
Created attachment 29450 [details]
modified kmainwindow classes

kmainwindow.tar.gz

Modified kmainwindow classes
Comment 2 Eike Hein 2009-07-05 14:10:20 UTC
*** Bug 199009 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Cullmann 2024-09-14 16:18:07 UTC
Hi,

kdelibs (version 4 and earlier) is no longer maintained since a few years.

KDE Frameworks 5 or 6 might already have implemented this wish.

If not, please re-open against the matching framework if feasible or against the application that shows the issue.

We then can still dispatch it to the right Bugzilla product or component.

Greetings
Christoph Cullmann