From 26d8eebe44fc6f28afe49f5e3d9a78ba41a356bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kimmo=20H=E4m=E4l=E4inen?= Date: Thu, 14 Oct 2010 12:08:44 +0300 Subject: Fixes: NB#196385 - Display is not updated correctly after screen blank on-off sequence, take two - also set followsCurrentApplicationWindowOrientation property for NB#179761 --- decorators/mdecorator/mdecoratorwindow.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'decorators') diff --git a/decorators/mdecorator/mdecoratorwindow.cpp b/decorators/mdecorator/mdecoratorwindow.cpp index 92347a0..d6ab04a 100644 --- a/decorators/mdecorator/mdecoratorwindow.cpp +++ b/decorators/mdecorator/mdecoratorwindow.cpp @@ -73,10 +73,10 @@ protected: virtual void activateEvent() { } - virtual void setAutoRotation(bool mode) { - decorwindow->setOrientationAngleLocked(!mode); - if (!mode) - decorwindow->setOrientationAngle(M::Angle0); + virtual void setAutoRotation(bool mode) + { + Q_UNUSED(mode) + // we follow the orientation of the topmost app } virtual void setOnlyStatusbar(bool mode) @@ -112,10 +112,6 @@ MDecoratorWindow::MDecoratorWindow(QWidget *parent) managedWindowAtom = XInternAtom(QX11Info::display(), "_MDECORATOR_MANAGED_WINDOW", False); - // default setting is not to rotate automatically - setOrientationAngle(M::Angle0); - setOrientationAngleLocked(true); - homeButtonPanel = new MHomeButtonPanel(); escapeButtonPanel = new MEscapeButtonPanel(); navigationBar = new MNavigationBar(); @@ -142,6 +138,7 @@ MDecoratorWindow::MDecoratorWindow(QWidget *parent) setMDecoratorWindowProperty(); setInputRegion(); + setProperty("followsCurrentApplicationWindowOrientation", true); } void MDecoratorWindow::setWindowTitle(const QString& title) -- cgit v1.2.3