Bug 319866 - Screen Portrait mode dictates application size for rest of the desktop. (squished application size)
Summary: Screen Portrait mode dictates application size for rest of the desktop. (squi...
Status: RESOLVED DUPLICATE of bug 286146
Alias: None
Product: kwin
Classification: Plasma
Component: xrandr (show other bugs)
Version: 4.10.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 10:57 UTC by Artur O.
Modified: 2013-05-30 21:01 UTC (History)
1 user (show)

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 Artur O. 2013-05-15 10:57:44 UTC
I have a multi monitor setup configured as below:
Left:       Benc 22" 1920x1080 "Portrait"
Middle:  Benc 22" 1920x1080 "Landscape"
Right:     Benc 22" 1920x1080 "Landscape/Portrait"

So Issue here is that all applications that gets open have the size to the portrait monitor no matter on what screen you launch them from, so in the end you get some weird squished applications.

Picture here as example.
http://imgur.com/oiQ5Q5H

Reproducible: Always

Steps to Reproduce:
1. Put one monitor into portrait mode
2. Launch applications 
3. Cake
Actual Results:  
Applications launch all squished

Expected Results:  
Normal application window with relevant size on the launched screen or at least somewhat standard size.

ArchLinux KDE 4.10.3
1 Xorg with 3 Monitors.
Comment 1 Martin Flöser 2013-05-15 12:06:15 UTC
Please provide output of
qdbus org.kde.kwin /KWin supportInformation
Comment 2 Artur O. 2013-05-15 12:37:36 UTC
(In reply to comment #1)
> Please provide output of
> qdbus org.kde.kwin /KWin supportInformation
Here it is:
http://codepad.org/NnjwouMC

Hm so looking at this its not multihead? Had no idea what other component it should be so open for feedback.
Comment 3 Martin Flöser 2013-05-15 13:19:38 UTC
now I must say that I don't understand the problem. At least in the screenshot I cannot determine what the problem should be. Could you please elaborate a little bit more what the problem is you are experiencing?
Comment 4 Artur O. 2013-05-15 13:25:49 UTC
(In reply to comment #3)
> now I must say that I don't understand the problem. At least in the
> screenshot I cannot determine what the problem should be. Could you please
> elaborate a little bit more what the problem is you are experiencing?

Issue is the size of the given application ad you see each kopete. Even if it launches on a screen that has much more space I need now to resize them to see anything
Comment 5 Thomas Lübking 2013-05-15 13:37:55 UTC
Can you please run:
    kwrite --geometry 800x800

and report whether the window opens at 800x800px or not.

If it does not, shutdown plasma
   kquitapp plasma-desktop
(ensure it's down, it crashes on exit here - in doubt "pkill -9" it)

and try again. Then report your findings.

---
btw, "squished" is out of some online dict?
-> "squashed"
Comment 6 Artur O. 2013-05-15 13:52:36 UTC
(In reply to comment #5)
> Can you please run:
>     kwrite --geometry 800x800
> 
> and report whether the window opens at 800x800px or not.
> 
> If it does not, shutdown plasma
>    kquitapp plasma-desktop
> (ensure it's down, it crashes on exit here - in doubt "pkill -9" it)
> 
> and try again. Then report your findings.
> 
> ---
> btw, "squished" is out of some online dict?
> -> "squashed"

It works atleast i think that is 800x600 it wont listen to something like 10x10 or 1920x1080 but that I guess is some minimum margin and maximum of given space on my portrait monitor?

Tried 1920x1080 did not work but when i tried 1080x1920 it went "fullscreen" so its indeed listening only to that monitor?
Comment 7 Thomas Lübking 2013-05-15 14:05:04 UTC
10x10 will not work because the window has a minimum size hint (or'd with the deco minimum size hint) and 1920x1080 will be constrained to 1080x1080 on a 1080x1920 screen (out of bounds condition)

So to sum up:
-----------------
1) passing a geometry request to the application gets you the desired geometry, so whatever is "miscalculated" (still no idea what and why, maybe post the output of "xwininfo" for a just shown window with "wrong" geometry) there is miscalculated in the client.

2) windows show up on or are in size restricted to the first screen.
Since "activeMouseScreen: false" the active screen is where the active window is. The way you launch applications may have impact on this.
Try what happens if you switch it on (in "kcmshell4 kwinoptions", 1st tab)
Comment 8 Artur O. 2013-05-15 14:29:05 UTC
(In reply to comment #7)
> 10x10 will not work because the window has a minimum size hint (or'd with
> the deco minimum size hint) and 1920x1080 will be constrained to 1080x1080
> on a 1080x1920 screen (out of bounds condition)
> 
> So to sum up:
> -----------------
> 1) passing a geometry request to the application gets you the desired
> geometry, so whatever is "miscalculated" (still no idea what and why, maybe
> post the output of "xwininfo" for a just shown window with "wrong" geometry)
> there is miscalculated in the client.
> 
> 2) windows show up on or are in size restricted to the first screen.
> Since "activeMouseScreen: false" the active screen is where the active
> window is. The way you launch applications may have impact on this.
> Try what happens if you switch it on (in "kcmshell4 kwinoptions", 1st tab)

1)
Kopete chat: http://codepad.org/23sxmBEr
Dolphin: http://codepad.org/wAGDhgnU
2) Did you mean Active screen follows mouse?
If so no, it launches on the correct screen but still kopete chat launches in smallest state.

Played with window rules with forcing or remember size and now dolphin goes full widescreen on each screen when moving from screen to screen. Even though i removed all my settings not sure why that happens now.
Comment 9 Thomas Lübking 2013-05-15 22:12:24 UTC
(In reply to comment #8)
> Kopete chat: http://codepad.org/23sxmBEr
Is only kopete affected?
(dolphin seems to have a reasonable size)

If so, this is very likely a kopete bug, perhaps a wrong size stored in ~/.kde/share/config/kopeterc and insufficient permissions on the file to fix that?

> now dolphin goes full widescreen on each screen when moving from 
> screen to screen.
I assume it's horizontally maximized?
(Happens automatically if the initial window size is >= the resp. workspace size, width in this case)
Comment 10 Artur O. 2013-05-16 07:38:58 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Kopete chat: http://codepad.org/23sxmBEr
> Is only kopete affected?
No many more applications are affected.
> (dolphin seems to have a reasonable size)
> 
> If so, this is very likely a kopete bug, perhaps a wrong size stored in
> ~/.kde/share/config/kopeterc and insufficient permissions on the file to fix
> that?
> 
> > now dolphin goes full widescreen on each screen when moving from 
> > screen to screen.
> I assume it's horizontally maximized?
> (Happens automatically if the initial window size is >= the resp. workspace
> size, width in this case)
Well dolphin now launches with that every time and I have to resize it down.... I can make a video to show this because allot of applications cannot handle this correctly. Steam launches correctly though and chromium goes fullscreen on the portrait monitor and thats not too bad...

Kopete chat windows* (small)
Dolphin (Full widescreen on each launch)
konversation  (Full widescreen on each launch)  
Konqueror (Full highscreen or what to call it)

A good workaround is to force size for each window in special window settings -> Size & Position. Atleast works for me
Comment 11 Thomas Lübking 2013-05-16 09:01:03 UTC
(In reply to comment #10)
> No many more applications are affected.
Please attach the config file (like ~/.kde/share/config/kwriterc) of such affected (if you have privacy worries: only the "[MainWindow]" section is relevant)

!! Also check the file permissions here (ie. whether the file belongs to your user and is writable) !!

> Well dolphin now launches with that every time
Do you still have a rule in place?
Otherwise please see above and post that info.
My guess is that the size is not stored on exit by those applications or chosen wrong on start.

> A good workaround is to force size for each window
No, that's a bad workaround. If at all "Apply initially" should do.
Comment 12 Artur O. 2013-05-18 13:33:00 UTC
(In reply to comment #11)
> (In reply to comment #10)

> Please attach the config file (like ~/.kde/share/config/kwriterc) of such
> affected (if you have privacy worries: only the "[MainWindow]" section is
> relevant)
dolphinrc .kde4/share/config/dolphinrc
http://codepad.org/LA7qI6TR

kopeterc .kde4/share/config/kopeterc
http://codepad.org/DJuvd4WJ

Not sure if this is the mainwindow or this also includes all the chat windows?

Today I tried to remove the rules from kopete chat windows and now they are not that small when launching. They don't remember their state if i re-size them and launch them again.

> !! Also check the file permissions here (ie. whether the file belongs to
> your user and is writable) !!
-rw------- 1 commander users 21609 18 maj 15.14 /home/commander/.kde4/share/config/kopeterc

-rw------- 1 commander users 2259 18 maj 15.16 /home/commander/.kde4/share/config/dolphinrc

So they seem correct. (my user is commander)

> Do you still have a rule in place?
No, everything is unchecked in "Special Window Settings", the only thing i changed, other than "Active sreen follows mouse" and "Seperate screen focus"

> No, that's a bad workaround. If at all "Apply initially" should do.
Apply Initially wont work for dolphin, it still goes full wide.
Comment 13 Thomas Lübking 2013-05-18 14:53:17 UTC
By those settings, kopete will be horizontally maximized on 1080 and 1920 width screens, dolphin only on the 1080 width one (ie. it should not be maximized if it opens on the landscape screen)

Dolphin will be 624px high (+titlebar) and kope will be 624px on the portrait and 573px on the landscape screen(s)

Is that what you observe?
Comment 14 Artur O. 2013-05-18 15:12:39 UTC
(In reply to comment #13)
> By those settings, kopete will be horizontally maximized on 1080 and 1920
> width screens.
Does not happen here. 
xwininfo on landscape monitor, http://codepad.org/proun6W0

> dolphin only on the 1080 width one (ie. it should not be
> maximized if it opens on the landscape screen)
It maximizes horizontally on all screens, Portrait and Landscape monitors.
xwininfo when launched on landscape monitor, http://codepad.org/NtV3TUKZ
xwininfo when launched on portrait monitor, http://codepad.org/Ju8hToAW

> Dolphin will be 624px high (+titlebar) and kope will be 624px on the
> portrait and 573px on the landscape screen(s)
>
> Is that what you observe?
Does not look like it, please see the xwininfo above.
Comment 15 Thomas Lübking 2013-05-18 15:34:35 UTC
No idea where kopete takes that width from, but is that actually the mainwindow or some tool (i've not much experience with kopete - to not say "none") - maybe inspect the config file tor related sizes.

Regarding dolphin: is your titlebar height + base height == 51px? (for the client itself has 573px from set 624, QMainWindow seems to rather include the window frame)
In case actually everything seems to work as can be expected here (leaving aside the completely unrelated kopete dimension for the moment)
Comment 16 Artur O. 2013-05-18 15:48:12 UTC
(In reply to comment #15)
> No idea where kopete takes that width from, but is that actually the
> mainwindow or some tool (i've not much experience with kopete - to not say
> "none") - maybe inspect the config file tor related sizes.
That is taken from the kopete main window, with that has the contact list etc...
Will have a closer look at the config..

> Regarding dolphin: is your titlebar height + base height == 51px? (for the
> client itself has 573px from set 624, QMainWindow seems to rather include
> the window frame)
> In case actually everything seems to work as can be expected here (leaving
> aside the completely unrelated kopete dimension for the moment)
I have default settings, window deco is oxygen and desktop is theme is the only one changed to produkt but dont think that the titlebar is related to that?

But how do you mean that it seems that everything is fine when Dolphin since I _need_ to select "force size" since Apply initially does not work and without any rules it maximizes horizontally no matter in what state i close dolphin and no matter what monitor i launch it on.

If i missed something then forgive me.
Comment 17 Thomas Lübking 2013-05-18 16:14:24 UTC
(In reply to comment #16)

> I have default settings, window deco is oxygen and desktop is theme is the
> only one changed to produkt but dont think that the titlebar is related to
> that?
No, but the question is wheter the upper and lower extensions of the decoration would sum up to 51px.
> 
> But how do you mean that it seems that everything is fine when Dolphin since
it means "you get what the config says" - if the config does not reflect what you expect (ie. the client does not properly safe its size on closing) you encounter whatever is behind bug #286146

Despite never resolved due to lack of reproducibility and semi-frozen kdelibs (to introduce a generally sanatizing overhaul of the way kmainwindow manages its geometry storage) that's actually not an issue of the WM.
Comment 18 Artur O. 2013-05-18 16:47:02 UTC
(In reply to comment #17)
> No, but the question is wheter the upper and lower extensions of the
> decoration would sum up to 51px.
I see.

> it means "you get what the config says" - if the config does not reflect
> what you expect (ie. the client does not properly safe its size on closing)
> you encounter whatever is behind bug #286146
> 
> Despite never resolved due to lack of reproducibility and semi-frozen
> kdelibs (to introduce a generally sanatizing overhaul of the way kmainwindow
> manages its geometry storage) that's actually not an issue of the WM.
Hm looked through that now, from what i know nVidia does not have TwinView anymore, however it seems i also have those bugs noted there, "smart placement" moving windows sometimes to top left corner. And judging by that bug and this one it does not always save the window configurations and thus gives me weird size on windows no matter what i do. Will take a closer look on that one now.

Though the weird sizes on windows started when i started with portrait monitor but that could mean that when closed on that monitor it saved it's settings and now behaves weird on my desktop/gives me unwanted sizes of windows. (since i need to force size on some)
Comment 19 Thomas Lübking 2013-05-18 19:25:44 UTC
Simple test:
- close all dolphin instances
- remove all irrelevant geometry settings (for non relevant resolutions) in the config (by hand, ie. using kwrite)
- configure easy to spot dimensions (like 800x400 & 400x800)
- open dolphin, check whether its size fits the one configured for the screen it appears on
- move it  to a distinct screen (ie. recall which one)
- resize dolphin to sth. different (~600x600)
- close dolphin
--> check changes in the config file
- launch dolphin again and see what happens.

In adding the pivot screen, the pivot is unlikely relevant, but the different resolution will be. I bet your right arm on that you just encounter bug #286146 - ie. kmainwindow starts to mess in resolution configuration if there's more than one screen.
Comment 20 Artur O. 2013-05-27 22:25:01 UTC
(In reply to comment #19)
> Simple test:
> - close all dolphin instances
> - remove all irrelevant geometry settings (for non relevant resolutions) in
> the config (by hand, ie. using kwrite)
> - configure easy to spot dimensions (like 800x400 & 400x800)
> - open dolphin, check whether its size fits the one configured for the
> screen it appears on
> - move it  to a distinct screen (ie. recall which one)
> - resize dolphin to sth. different (~600x600)
> - close dolphin
> --> check changes in the config file
> - launch dolphin again and see what happens.
> 
> In adding the pivot screen, the pivot is unlikely relevant, but the
> different resolution will be. I bet your right arm on that you just
> encounter bug #286146 - ie. kmainwindow starts to mess in resolution
> configuration if there's more than one screen.

Sorry that it took some time but yes it seems that it only saves the size from one monitor. From testing it only saves on my portrait monitor ie the 0.0 screen
Comment 21 Thomas Lübking 2013-05-30 21:01:30 UTC
(In reply to comment #20)
> Sorry that it took some time
nevermind.

> but yes it seems that it only saves the size from one monitor.
Does it not save at all on the other screen or does it save related to the wrong screen geometry?

I'm pretty sure though this is the same bug and am pretty sure it's in kmainwindow. With kdelibs semi-opened (if i got that right...) it might be worth to take a closer look there ;-)

*** This bug has been marked as a duplicate of bug 286146 ***