@@ -131,9 +131,6 @@ Rectangle {
131131 anchors.right: root.right
132132 width: units.gu(30)
133133
134− property var focusedApp: ApplicationManager.findApplication(ApplicationManager.focusedApplicationId)
135− property var focusedSurface: focusedApp && focusedApp.session ? focusedApp.session.lastSurface : null
136−
137134 Rectangle {
138135 id: controlRect
139136 anchors { left: parent.left; right: parent.right }
@@ -285,21 +282,21 @@ Rectangle {
285282 id: fullscreeAppCheck
286283
287284 onTriggered: {
288− if (!controls.focusedSurface) return;
289− if (controls.focusedSurface.state == Mir.FullscreenState) {
290− controls.focusedSurface.state = Mir.RestoredState;
285+ if (!MirFocusController.focusedSurface) return;
286+ if (MirFocusController.focusedSurface.state == Mir.FullscreenState) {
287+ MirFocusController.focusedSurface.state = Mir.RestoredState;
291288 } else {
292− controls.focusedSurface.state = Mir.FullscreenState;
289+ MirFocusController.focusedSurface.state = Mir.FullscreenState;
293290 }
294291 }
295292
296293 Binding {
297294 target: fullscreeAppCheck
298− when: controls.focusedSurface
295+ when: MirFocusController.focusedSurface
299296 property: "checked"
300297 value: {
301− if (!controls.focusedSurface) return false;
302− return controls.focusedSurface.state === Mir.FullscreenState
298+ if (!MirFocusController.focusedSurface) return false;
299+ return MirFocusController.focusedSurface.state === Mir.FullscreenState
303300 }
304301 }
305302 }
@@ -313,21 +310,21 @@ Rectangle {
313310 id: chromeAppCheck
314311
315312 onTriggered: {
316− if (!controls.focusedSurface) return;
317− if (controls.focusedSurface.shellChrome == Mir.LowChrome) {
318− controls.focusedSurface.setShellChrome(Mir.NormalChrome);
313+ if (!MirFocusController.focusedSurface) return;
314+ if (MirFocusController.focusedSurface.shellChrome == Mir.LowChrome) {
315+ MirFocusController.focusedSurface.setShellChrome(Mir.NormalChrome);
319316 } else {
320− controls.focusedSurface.setShellChrome(Mir.LowChrome);
317+ MirFocusController.focusedSurface.setShellChrome(Mir.LowChrome);
321318 }
322319 }
323320
324321 Binding {
325322 target: chromeAppCheck
326− when: controls.focusedSurface !== null
323+ when: MirFocusController.focusedSurface !== null
327324 property: "checked"
328325 value: {
329− if (!controls.focusedSurface) return false;
330− controls.focusedSurface.shellChrome === Mir.LowChrome
326+ if (!MirFocusController.focusedSurface) return false;
327+ MirFocusController.focusedSurface.shellChrome === Mir.LowChrome
331328 }
332329 }
333330 }