Bug 309521 - Dual screen: Windows in second screen got their size not saved
Summary: Dual screen: Windows in second screen got their size not saved
Status: RESOLVED DUPLICATE of bug 286146
Alias: None
Product: kwin
Classification: Plasma
Component: xinerama (show other bugs)
Version: 4.9.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-04 11:54 UTC by Mathieu MD
Modified: 2013-01-09 14:00 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 Mathieu MD 2012-11-04 11:54:04 UTC
[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)
Comment 1 Thomas Lübking 2012-11-04 13:46:14 UTC
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
Comment 2 Martin Flöser 2013-01-07 17:04:13 UTC
I'd say it's a duplicate

*** This bug has been marked as a duplicate of bug 286146 ***
Comment 3 Mathieu MD 2013-01-07 18:49:02 UTC
> 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.
Comment 4 Thomas Lübking 2013-01-07 20:09:41 UTC
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?
Comment 5 Mathieu MD 2013-01-08 08:23:39 UTC
Thomas, that is correct.

Is this the same as bug 286146?

Thanks.
Comment 6 Thomas Lübking 2013-01-08 13:22:05 UTC
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)
Comment 7 Mathieu MD 2013-01-09 08:37:26 UTC
OK. Is there anything more I can do to help debug it?
Comment 8 Thomas Lübking 2013-01-09 14:00:13 UTC
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)