@@ -77,6 +77,9 @@ FocusScope {
7777 // FIXME: if application focused before shell starts, shell draws on top of it only.
7878 // We should detect already running applications on shell start and bring them to the front.
7979 applicationManager.unfocusCurrentApplication();
80+
81+ applicationManager.setMainStageAppRect(mainStageAppRect);
82+ applicationManager.setSideStageAppRect(sideStageAppRect);
8083 }
8184
8285 readonly property bool applicationFocused: !!applicationManager.mainStageFocusedApplication
@@ -378,6 +381,26 @@ FocusScope {
378381 orientation: Qt.Horizontal
379382 }
380383
384+ // Defines the rectangle occupied by an application on the main or side stage.
385+ // Used only to inform the ApplicationManager. Can be removed when the proper
386+ // architecture is in place (unity8 as mir compositor).
387+ Item {
388+ id: mainStageAppRect
389+ x: mainStage.x
390+ y: mainStage.y + mainStage.normalApplicationY
391+ width: mainStage.width
392+ height: mainStage.height
393+ visible: false; enabled: false
394+ }
395+ Item {
396+ id: sideStageAppRect
397+ x: sideStageRevealer.openedValue
398+ y: sideStage.y + sideStage.normalApplicationY
399+ width: sideStage.width
400+ height: sideStage.height
401+ visible: false; enabled: false
402+ }
403+
381404 DragHandle {
382405 id: stagesDragHandle
383406