on xenial help sign in
Use new ApplicationManager API
commit919a2128e186d9c4f4be32076e238b6982db1f63 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateWed 12 Feb 2014, 13:40 (13 years ago) parent37a0c68
2 files changed+31
qml/Components/ApplicationManagerWrapper.qml+8 qml/Shell.qml+23
qml/Components/ApplicationManagerWrapper.qml+8
@@ -166,4 +166,12 @@ Item {
166166 }
167167 return desktopFile.substring(left+1, right);
168168 }
169+
170+ function setMainStageAppRect(item) {
171+ ApplicationManager.setMainStageAppRect(item);
172+ }
173+
174+ function setSideStageAppRect(item) {
175+ ApplicationManager.setSideStageAppRect(item);
176+ }
169177}
qml/Shell.qml+23
@@ -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