@@ -255,6 +255,9 @@ AbstractStage {
255 focus: appId === priv.focusedAppId
255 focus: appId === priv.focusedAppId
256 width: decoratedWindow.width
256 width: decoratedWindow.width
257 height: decoratedWindow.height
257 height: decoratedWindow.height
258+ rotation: decoratedWindow.application && decoratedWindow.application.rotatesWindowContents
259+ ? ((360 - shellOrientationAngle) % 360) : 0
258 property alias requestedWidth: decoratedWindow.requestedWidth
261 property alias requestedWidth: decoratedWindow.requestedWidth
259 property alias requestedHeight: decoratedWindow.requestedHeight
262 property alias requestedHeight: decoratedWindow.requestedHeight
260 property alias minimumWidth: decoratedWindow.minimumWidth
263 property alias minimumWidth: decoratedWindow.minimumWidth
@@ -356,7 +359,8 @@ AbstractStage {
356 name: "fullscreen"; when: decoratedWindow.fullscreen
359 name: "fullscreen"; when: decoratedWindow.fullscreen
357 PropertyChanges {
360 PropertyChanges {
358 target: appDelegate;
361 target: appDelegate;
362+ x: rotation == 0 ? 0 : (parent.width - width) / 2 + (shellOrientationAngle == 90 ? -PanelState.panelHeight : PanelState.panelHeight)
359− x: 0; y: -PanelState.panelHeight
363+ y: rotation == 0 ? -PanelState.panelHeight : (parent.height - height) / 2
360 requestedWidth: appContainer.width; requestedHeight: appContainer.height;
364 requestedWidth: appContainer.width; requestedHeight: appContainer.height;
@@ -466,6 +470,7 @@ AbstractStage {
466 application: ApplicationManager.get(index)
470 application: ApplicationManager.get(index)
467 active: ApplicationManager.focusedApplicationId === model.appId
471 active: ApplicationManager.focusedApplicationId === model.appId
468 focus: true
472 focus: true
473+ surfaceOrientationAngle: application && application.rotatesWindowContents ? shellOrientationAngle : 0
470 onClose: ApplicationManager.stopApplication(model.appId)
475 onClose: ApplicationManager.stopApplication(model.appId)
471 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
476 onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight