Bug 179722 - xrandr -o left causing maximized windows to shrink to smallest possible size
Summary: xrandr -o left causing maximized windows to shrink to smallest possible size
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: xrandr (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-05 15:56 UTC by stefnn
Modified: 2012-04-22 18:36 UTC (History)
4 users (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 stefnn 2009-01-05 15:56:28 UTC
Version:           4.1.87 (using Devel)
Compiler:          gcc version 4.1.2 
OS:                Linux
Installed from:    Compiled sources

when using the command line utility xrandr to rotate the screen, all maximized windows are getting resized to the minimal possible size.

(When using KRandrTray this does not happen.)

The problem seems to be the following:

xrandr does first delete the current screen 
(kephal gets notified about this together with a new screen size of 0x0 px) and then afterwards creates a new rotated screen of the right size.

I guess, kwin calculates the "new maximized size" for a window on the 0x0 screen to the smallest possible size for that particular window (say 100x50). This is of course no longer fullscreen on a 0x0 screen, and when later getting a big screen again, this window is not considered maximized and therefore not resized to the full screen size but stays at its 100x50 px.

(just for info: KRandrTray does its job a little bit different: it only rotates the existing screen - and therefore kwin handles the maximized windows correctly in that case.)
Comment 1 Martin Flöser 2009-04-07 22:50:31 UTC
is this reproducable with KDE 4.2.2?
Comment 2 Thomas Bächler 2009-05-03 13:37:40 UTC
I probably have the same problem on 4.2.2 (not tested on 4.2.3 yet, didn't use randr since I updated):

I do the following on the commandline:
xrandr --output VGA1 --mode 1024x768 --below LVDS1 --output LVDS1 --primary
(LVDS1 has resolution 1280x800)
Everything is still great, but after I run
xrandr --output VGA1 --off
the windows are small exactly as described in the original bug report.

using:
Archlinux
libxrandr 1.3.0
xorg-server-utils 7.4
xorg-server 1.6.1
Comment 3 stefnn 2009-05-03 21:29:49 UTC
note that there's a bug in kephal that in addition gives kwin the wrong screen size information when the screen is in randr-rotated mode.
(so when maximizing windows they are half off the screen in rotated mode)
See: bug #168308
I triggered Aaron again about this issue (as he nearly fixed it last time) ... but he didn't seem to respond/notice.
Comment 4 kde2eran 2010-09-07 17:30:15 UTC
See bug 250462 (Windows shrink to minimum size when all outputs disabled) for a related problem.
Comment 5 FiNeX 2010-10-10 17:52:45 UTC
Could this bug be a duplicate of bug #154365 ?
Comment 6 Marcel Schaal 2010-10-13 03:49:04 UTC
I couldn't reproduce it with "xrandr -o left", but if I disable all outputs, which is sadly possible, unmaximized windows are shrined to their smallest size.
Comment 7 Marcel Schaal 2010-10-13 03:51:15 UTC
Reproducd on Fedora 13 with KDE 4.5.2
Comment 8 Martin Flöser 2012-04-08 21:09:07 UTC
It would be interesting to know whether this issue still exists as Kephal nowadays uses QDesktopWidget to gain screen information and at least in current master KWin does no longer use kephal.
Comment 9 stefnn 2012-04-22 15:28:04 UTC
have to admit, that i switched to enlightenment as DE (feels much slicker for use on my tablet/convertible PC)...

but a quick test with current kde-4.8.2 seemed to be working more or less correct (had plasma panel shadows appear somewhere in the middle of the screen when mouse moved over that region - probably placing problem, which i remember to be there since long times - but i guess thats a different bug...).

So probably the switch away from kephal did solve that bug here.

Too bad - kephal was a nice idea, but was so buggy that no-one (and now also none of the kde internals ?!?) does use it (anymore?).
Comment 10 Thomas Lübking 2012-04-22 15:54:29 UTC
errmm... i rotate screens (tablet and desktop) > a dozen times every day and have never faced that (and have to admit that gnnn... i actually quite often have a max'd browser on the tablet :-\

as for deactivating all outputs, this might be covered by
https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/f3a9f5f0e5a73300ddd35faa1dc5b2d7cae6894a
(because you'll unlikley explicitly change the geometry while there's no display) what actually could make this bug a partial dupe...
Comment 11 stefnn 2012-04-22 17:55:34 UTC
@Thomas Lübking:
As mentioned in the original bug report, it depended on how you rotate the screen (the KRandrTray method always worked fine) - not sure if xrandr changed the way they do it (from deleting the screen and creating a new rotated one to simply rotating the existing screen) or if KWin now handles things correct.

But at least, my original test case (using xrandr) nowadays does no longer reproduce the problem - so probably this bug can be marked as resolved...
Comment 12 Martin Flöser 2012-04-22 18:36:52 UTC
fixed as of comment #11