@@ -131,9 +131,6 @@ Rectangle {
131 anchors.right: root.right
131 anchors.right: root.right
132 width: units.gu(30)
132 width: units.gu(30)
134− property var focusedApp: ApplicationManager.findApplication(ApplicationManager.focusedApplicationId)
135− property var focusedSurface: focusedApp && focusedApp.session ? focusedApp.session.lastSurface : null
137 Rectangle {
134 Rectangle {
138 id: controlRect
135 id: controlRect
139 anchors { left: parent.left; right: parent.right }
136 anchors { left: parent.left; right: parent.right }
@@ -285,21 +282,21 @@ Rectangle {
285 id: fullscreeAppCheck
282 id: fullscreeAppCheck
287 onTriggered: {
284 onTriggered: {
288− if (!controls.focusedSurface) return;
285+ if (!MirFocusController.focusedSurface) return;
289− if (controls.focusedSurface.state == Mir.FullscreenState) {
286+ if (MirFocusController.focusedSurface.state == Mir.FullscreenState) {
290− controls.focusedSurface.state = Mir.RestoredState;
287+ MirFocusController.focusedSurface.state = Mir.RestoredState;
292− controls.focusedSurface.state = Mir.FullscreenState;
289+ MirFocusController.focusedSurface.state = Mir.FullscreenState;
296 Binding {
293 Binding {
297 target: fullscreeAppCheck
294 target: fullscreeAppCheck
298− when: controls.focusedSurface
295+ when: MirFocusController.focusedSurface
299 property: "checked"
296 property: "checked"
301− if (!controls.focusedSurface) return false;
298+ if (!MirFocusController.focusedSurface) return false;
302− return controls.focusedSurface.state === Mir.FullscreenState
299+ return MirFocusController.focusedSurface.state === Mir.FullscreenState
@@ -313,21 +310,21 @@ Rectangle {
313 id: chromeAppCheck
310 id: chromeAppCheck
315 onTriggered: {
312 onTriggered: {
316− if (!controls.focusedSurface) return;
313+ if (!MirFocusController.focusedSurface) return;
317− if (controls.focusedSurface.shellChrome == Mir.LowChrome) {
314+ if (MirFocusController.focusedSurface.shellChrome == Mir.LowChrome) {
318− controls.focusedSurface.setShellChrome(Mir.NormalChrome);
315+ MirFocusController.focusedSurface.setShellChrome(Mir.NormalChrome);
320− controls.focusedSurface.setShellChrome(Mir.LowChrome);
317+ MirFocusController.focusedSurface.setShellChrome(Mir.LowChrome);
324 Binding {
321 Binding {
325 target: chromeAppCheck
322 target: chromeAppCheck
326− when: controls.focusedSurface !== null
323+ when: MirFocusController.focusedSurface !== null
327 property: "checked"
324 property: "checked"
329− if (!controls.focusedSurface) return false;
326+ if (!MirFocusController.focusedSurface) return false;
330− controls.focusedSurface.shellChrome === Mir.LowChrome
327+ MirFocusController.focusedSurface.shellChrome === Mir.LowChrome