Bug 101516 - desktop is not correctly resized/updated after Xrandr rotate event
Summary: desktop is not correctly resized/updated after Xrandr rotate event
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-14 21:35 UTC by Anonymous Coward
Modified: 2008-08-30 16:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
kicker does not move and resize when rotating (185.63 KB, image/jpeg)
2007-02-20 17:44 UTC, Philipp W
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anonymous Coward 2005-03-14 21:35:57 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Gentoo Packages
OS:                Linux

After rotating the screen 90 degrees using Xrandr (e.g. running "xrandr -o left" or doing its equivalent in kcontrol), the root window is resized (it's x and y dimensions are swapped). But the KDE desktop's content is not: windows are not resized, so they (even maximized ones) overlap the screen on the right side and the kicker panel is at its position before rotation, not moved down. The result is that there's black unused part of screen near the (rotated) bottom. For example, when the display uses 1280x1024 resolution, the root window is 1024x1280 after rotation (xdpyinfo reports this, I can move mouse cursor in this area), but app windows, KDE's background image and kicker still cover the old 1280x1204 area (of which only 1024x1024 is visible because the rotated screen is only 1024 pixels wide).

Kwin should resize the desktop in the same way as when I change resolution using Xrandr: e.g. when switching from 1280x1024 to 800x600, all windows, background and kicker are resized to fit into 800x600 area. The same should happen when rotation happens, but it doesn't. (I couldn't figure out why, the kwin and Qt code I looked at looks OK to me.)

This can be seen using the latest version of nVidia's binary X11 drivers (1.0-7167), which supports Xrandr rotation with X.Org 6.8.2. I first thought this was a bug in their Xrandr implementation, but everything works flawlessly under Metacity WM.

See also here:
http://www.nvnews.net/vbulletin/showthread.php?t=47581
Comment 1 Anonymous Coward 2005-03-20 11:12:10 UTC
Same bug in KDE 3.4.0.
Comment 2 Lubos Lunak 2005-04-11 13:15:18 UTC
CVS commit by lunakl: 

The old qt-copy patch #0032 was wrong, and the real problem is in the X server
anyway, see https://bugs.freedesktop.org/show_bug.cgi?id=2965 .
BUG: 101516
CCBUG: 67101
CCMAIL: Hamish Rodda <rodda@kde.org>


  M +15 -88    0032-fix_rotated_randr.diff   1.4
Comment 3 Hans Hvelplund Odborg 2005-04-13 15:31:14 UTC
restart kwin together with kdesktop and kicker helps somewhat. Except now the tray panel has disappeared until next login.
Comment 4 Hans Hvelplund Odborg 2005-04-13 15:31:28 UTC
restart kwin together with kdesktop and kicker helps somewhat. Except now the tray panel has disappeared until next login.
Comment 5 Anonymous Coward 2005-04-20 00:33:13 UTC
Unfortunately 0032-fix_rotated_randr.diff doesn't help here (Qt 3.3.4, X.Org 6.8.2, KDE 3.4.0). It still behaves as before, neither background nor kicker is updated. Same behavior with the newest 7174 nvidia driver.
Comment 6 Lubos Lunak 2005-04-20 15:43:35 UTC
The real bug is in the XServer (or the driver), see the x.org bugreport.
Comment 7 Anonymous Coward 2005-04-21 08:41:54 UTC
But the patch is, according to its description, supposed to work around it, isn't? Well, it doesn't.
Comment 8 Lubos Lunak 2005-04-22 17:55:49 UTC
Workarounds are not, and cannot be, guaranteed to work.
Comment 9 Martin Zdila 2005-06-23 10:27:35 UTC
I use KDE 3.4.1 from Debian experimental with XOrg (don't know the version right now - it's on the another computer).

see:
http://www.episoftware.com/~martin/xrandr.png
(http://www.kde-forum.org/thread.php?threadid=12121)
Comment 10 Lubos Lunak 2005-06-23 15:31:07 UTC
Qt needs the patch mentioned in this bugreport. It's been sent to TT, and you can ask your packager to include it. There's nothing more we can do, sorry.
Comment 11 Anonymous Coward 2005-06-23 15:42:07 UTC
You may want to try your luck with the _previous_ version of the aforementioned patch to Qt, which -- while reportedly wrong -- actually helps with the problem.
Comment 12 Philipp W 2007-02-20 17:43:06 UTC
I still have the problem with KDE 3.5.5. The kicker is not moved to the right place and resized to correct site. (Normally there is a clock on right side =>check the attachment.)
Comment 13 Philipp W 2007-02-20 17:44:02 UTC
Created attachment 19761 [details]
kicker does not move and resize when rotating
Comment 14 Magnus Holmgren 2007-11-26 21:47:29 UTC
KDE 3.5.8. When switching to left or right orientation no ConfigureNotify event is sent (or at least xev doesn't receive one). When rotating to normal or inverted orientation the event *is* sent and received properly. There are no problems when running Gnome.
Comment 15 be_leonardo 2008-05-10 14:52:04 UTC
KDE 3.5.8 and 3.5.7 both on Gentoo 2.6.22-gentoo-r5
The orientation is done right (by xrand or krandrtray), but kdesktop, kwin and kicker don't get resized.

Temporary script solution which I found:
#! /bin/bash
#1.Rotate the screen
xrandr -o left
#2. Restart kicker
dcop kicker kicker restart
#3. Restart kwin
kwin --replace&
#4. Kill and restart kdesktop
killall -9 kdesktop && kdesktop&

or sometimes helps just
killall -9 kwin && kwin&

There where no problems with the same hardware on Mandriva 2007 (1,5 year ago).
Comment 16 Philipp W 2008-08-30 16:43:40 UTC
*** This bug has been confirmed by popular vote. ***