[Original bug report on Launchpad: https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1062711] On my dual screen configuration (as seen here http://imageshack.us/a/img202/7569/screenshottee.jpg; the "main output" is set to the screen of right) an application window resized on the left screen will have its new size remembered, while if resized on the right screen it will not. Reproducible: Always Steps to Reproduce: 1) Open a Konsole --> Its size is SIZE0 2) [Move it to left screen if not already there] 3) Resize it --> Its size is now SIZE1 4) Close it 5) Re-open it --> It opens with the resized dimensions, SIZE1, which is OK. 6) Move it to right screen 7) Resize it -- Its size is now SIZE2 (or SIZE0) 8) Close it 9) Re-open it Actual Results: It opens with the SIZE1. Expected Results: It should open with the SIZE2 (or SIZE0). ProblemType: Bug DistroRelease: Ubuntu 12.10 Package: kde-workspace-bin 4:4.9.2-0ubuntu1 ProcVersionSignature: Ubuntu 3.5.0-17.27-generic 3.5.5 Uname: Linux 3.5.0-17-generic i686 ApportVersion: 2.6.1-0ubuntu1 Architecture: i386 Date: Sat Oct 6 08:35:48 2012 ExecutablePath: /usr/bin/startkde InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012) InterpreterPath: /bin/dash SourcePackage: kde-workspace UpgradeStatus: Upgraded to quantal on 2012-09-13 (22 days ago)
Aplications re/store their size, it's not the WMs job. For KDE applications, the size is stored per screen geometry. So the critical question here is: -> on what screen does the application start and how does that correspond to the restored size (ie. for the particular case: if it opens on the left screen, the behavior is actually expected) I'm not sure whether kmaimapplication recognizes the multiscreen setup (or unconditionally takes geometry of screen 1) or when it determines the current screen (since the WM will place it according to its oppinion of the active screen, eg. where the cursor is), but the bug is in the way kmainapplications re/stores its geometry. Also see bug #286146
I'd say it's a duplicate *** This bug has been marked as a duplicate of bug 286146 ***
> So the critical question here is: -> on what screen does the application start and how does that correspond to the restored size (ie. for the particular case: if it opens on the left screen, the behavior is actually expected) Applications starts on the current screen (where the cursor is). But the size is always the last one of screen 0. As I understand bug 286146, it seems different (size is remembered, but only if saved from screen 0). However, I just tried with Firefox, and it does save its size even from on screen 1. Konsole, Dolphin or Kate do not, which is why I reported this bug.
That's pretty much a/the kmainwindow bug then (non KDE application work) To make it very clear: - you open kwrite (not dolphin or konsole, they run in one PID what makes things extra special) on screen 0, resize and close it there and it restores with that size from screen 0 also on screen 1 - you open kwrite on screen 1, resize and close it there and it restores on screen 1 with the last known size from screen 0 That correct?
Thomas, that is correct. Is this the same as bug 286146? Thanks.
Yupp, seems to be a bug in KMainWindow about when it figures which size to restore (before mapping, thus placement, thus it actually known what screen it ends up on, assuming it's on screen 0 all the time)
OK. Is there anything more I can do to help debug it?
Check the KMainWindow code for bugs ;-) Otherwise no, stay tuned reg. bug #286146 and try patches whenever they show up (not guaranteed to happen during KDE4 lifecycle, depends on bug complexity)