@@ -255,6 +255,9 @@ AbstractStage {
255255 focus: appId === priv.focusedAppId
256256 width: decoratedWindow.width
257257 height: decoratedWindow.height
258+ rotation: decoratedWindow.application && decoratedWindow.application.rotatesWindowContents
259+ ? ((360 - shellOrientationAngle) % 360) : 0
260+
258261 property alias requestedWidth: decoratedWindow.requestedWidth
259262 property alias requestedHeight: decoratedWindow.requestedHeight
260263 property alias minimumWidth: decoratedWindow.minimumWidth
@@ -356,7 +359,8 @@ AbstractStage {
356359 name: "fullscreen"; when: decoratedWindow.fullscreen
357360 PropertyChanges {
358361 target: appDelegate;
359− x: 0; y: -PanelState.panelHeight
362+ x: rotation == 0 ? 0 : (parent.width - width) / 2 + (shellOrientationAngle == 90 ? -PanelState.panelHeight : PanelState.panelHeight)
363+ y: rotation == 0 ? -PanelState.panelHeight : (parent.height - height) / 2
360364 requestedWidth: appContainer.width; requestedHeight: appContainer.height;
361365 }
362366 },
@@ -466,6 +470,7 @@ AbstractStage {
466470 application: ApplicationManager.get(index)
467471 active: ApplicationManager.focusedApplicationId === model.appId
468472 focus: true
473+ surfaceOrientationAngle: application && application.rotatesWindowContents ? shellOrientationAngle : 0
469474
470475 onClose: ApplicationManager.stopApplication(model.appId)
471476 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight