on xenial help sign in
don't shrink the complete stage
78c2f29Michael Zanetti
qml/Launcher/Launcher.qml+1−1
@@ -95,7 +95,7 @@ FocusScope {
95
95
96 onLockedVisibleChanged: {
96 onLockedVisibleChanged: {
97 if (lockedVisible && state == "") {
97 if (lockedVisible && state == "") {
98− dismissTimer.stop();
98+ panel.dismissTimer.stop();
99 fadeOutAnimation.stop();
99 fadeOutAnimation.stop();
100 switchToNextState("visible")
100 switchToNextState("visible")
101 } else if (!lockedVisible && state == "visible") {
101 } else if (!lockedVisible && state == "visible") {
qml/Shell.qml+1−1
@@ -352,7 +352,7 @@ Item {
352 Binding {
352 Binding {
353 target: applicationsDisplayLoader.item
353 target: applicationsDisplayLoader.item
354 property: "leftMargin"
354 property: "leftMargin"
355− value: launcher.lockedVisible ? launcher.panelWidth: 0
355+ value: shell.usageScenario == "desktop" && !settings.autohideLauncher ? launcher.panelWidth: 0
356 }
356 }
357 }
357 }
358
358
qml/Stages/DesktopStage.qml+227−231
@@ -224,9 +224,12 @@ AbstractStage {
224 PanelState.dropShadow = false;
224 PanelState.dropShadow = false;
225 }
225 }
226
226
227− Item {
227+
228− id: stageContainer
228+ FocusScope {
229+ id: appContainer
230+ objectName: "appContainer"
229 anchors.fill: parent
231 anchors.fill: parent
232+ focus: spread.state !== "altTab"
230
233
231 CrossFadeImage {
234 CrossFadeImage {
232 id: wallpaper
235 id: wallpaper
@@ -236,245 +239,238 @@ AbstractStage {
236 fillMode: Image.PreserveAspectCrop
239 fillMode: Image.PreserveAspectCrop
237 }
240 }
238
241
239− FocusScope {
240− id: appContainer
241− objectName: "appContainer"
242− anchors.fill: parent
243− anchors.leftMargin: root.leftMargin
244− focus: spread.state !== "altTab"
245−
246− Repeater {
242+ Repeater {
247− id: appRepeater
243+ id: appRepeater
248− model: ApplicationManager
244+ model: ApplicationManager
249− objectName: "appRepeater"
245+ objectName: "appRepeater"
250−
246+
251− delegate: FocusScope {
247+ delegate: FocusScope {
252− id: appDelegate
248+ id: appDelegate
253− objectName: "appDelegate_" + appId
249+ objectName: "appDelegate_" + appId
254− // z might be overriden in some cases by effects, but we need z ordering
250+ // z might be overriden in some cases by effects, but we need z ordering
255− // to calculate occlusion detection
251+ // to calculate occlusion detection
256− property int normalZ: ApplicationManager.count - index
252+ property int normalZ: ApplicationManager.count - index
257− z: normalZ
253+ z: normalZ
258− y: PanelState.panelHeight
254+ y: PanelState.panelHeight
259− focus: appId === priv.focusedAppId
255+ focus: appId === priv.focusedAppId
260− width: decoratedWindow.width
256+ width: decoratedWindow.width
261− height: decoratedWindow.height
257+ height: decoratedWindow.height
262− property alias requestedWidth: decoratedWindow.requestedWidth
258+ property alias requestedWidth: decoratedWindow.requestedWidth
263− property alias requestedHeight: decoratedWindow.requestedHeight
259+ property alias requestedHeight: decoratedWindow.requestedHeight
264− property alias minimumWidth: decoratedWindow.minimumWidth
260+ property alias minimumWidth: decoratedWindow.minimumWidth
265− property alias minimumHeight: decoratedWindow.minimumHeight
261+ property alias minimumHeight: decoratedWindow.minimumHeight
266− property alias maximumWidth: decoratedWindow.maximumWidth
262+ property alias maximumWidth: decoratedWindow.maximumWidth
267− property alias maximumHeight: decoratedWindow.maximumHeight
263+ property alias maximumHeight: decoratedWindow.maximumHeight
268− property alias widthIncrement: decoratedWindow.widthIncrement
264+ property alias widthIncrement: decoratedWindow.widthIncrement
269− property alias heightIncrement: decoratedWindow.heightIncrement
265+ property alias heightIncrement: decoratedWindow.heightIncrement
270−
266+
271−
272− QtObject {
267+ QtObject {
273− id: appDelegatePrivate
268+ id: appDelegatePrivate
274− property bool maximized: false
269+ property bool maximized: false
275− property bool maximizedLeft: false
270+ property bool maximizedLeft: false
276− property bool maximizedRight: false
271+ property bool maximizedRight: false
277− property bool minimized: false
272+ property bool minimized: false
278− }
273+ }
279− readonly property alias maximized: appDelegatePrivate.maximized
274+ readonly property alias maximized: appDelegatePrivate.maximized
280− readonly property alias maximizedLeft: appDelegatePrivate.maximizedLeft
275+ readonly property alias maximizedLeft: appDelegatePrivate.maximizedLeft
281− readonly property alias maximizedRight: appDelegatePrivate.maximizedRight
276+ readonly property alias maximizedRight: appDelegatePrivate.maximizedRight
282− readonly property alias minimized: appDelegatePrivate.minimized
277+ readonly property alias minimized: appDelegatePrivate.minimized
283−
278+
284− readonly property string appId: model.appId
279+ readonly property string appId: model.appId
285− property bool animationsEnabled: true
280+ property bool animationsEnabled: true
286− property alias title: decoratedWindow.title
281+ property alias title: decoratedWindow.title
287− readonly property string appName: model.name
282+ readonly property string appName: model.name
288− property bool visuallyMaximized: false
283+ property bool visuallyMaximized: false
289− property bool visuallyMinimized: false
284+ property bool visuallyMinimized: false
290−
285+
291− onFocusChanged: {
286+ onFocusChanged: {
292− if (focus && ApplicationManager.focusedApplicationId !== appId) {
287+ if (focus && ApplicationManager.focusedApplicationId !== appId) {
293− ApplicationManager.focusApplication(appId);
288+ ApplicationManager.focusApplication(appId);
294− }
295 }
289 }
290+ }
296
291
297− onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
292+ onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
298−
293+
299− visible: !visuallyMinimized &&
294+ visible: !visuallyMinimized &&
300− !greeter.fullyShown &&
295+ !greeter.fullyShown &&
301− (priv.foregroundMaximizedAppZ === -1 || priv.foregroundMaximizedAppZ <= z) ||
296+ (priv.foregroundMaximizedAppZ === -1 || priv.foregroundMaximizedAppZ <= z) ||
297+ decoratedWindow.fullscreen ||
302− (spread.state == "altTab" && index === spread.highlightedIndex)
298+ (spread.state == "altTab" && index === spread.highlightedIndex)
303−
299+
304− Binding {
300+ Binding {
305− target: ApplicationManager.get(index)
301+ target: ApplicationManager.get(index)
306− property: "requestedState"
302+ property: "requestedState"
307− // TODO: figure out some lifecycle policy, like suspending minimized apps
303+ // TODO: figure out some lifecycle policy, like suspending minimized apps
308− // if running on a tablet or something.
304+ // if running on a tablet or something.
309− // TODO: If the device has a dozen suspended apps because it was running
305+ // TODO: If the device has a dozen suspended apps because it was running
310− // in staged mode, when it switches to Windowed mode it will suddenly
306+ // in staged mode, when it switches to Windowed mode it will suddenly
311− // resume all those apps at once. We might want to avoid that.
307+ // resume all those apps at once. We might want to avoid that.
312− value: ApplicationInfoInterface.RequestedRunning // Always running for now
308+ value: ApplicationInfoInterface.RequestedRunning // Always running for now
313− }
309+ }
314
310
315− function maximize(animated) {
311+ function maximize(animated) {
316− animationsEnabled = (animated === undefined) || animated;
312+ animationsEnabled = (animated === undefined) || animated;
317− appDelegatePrivate.minimized = false;
313+ appDelegatePrivate.minimized = false;
318− appDelegatePrivate.maximized = true;
314+ appDelegatePrivate.maximized = true;
319− appDelegatePrivate.maximizedLeft = false;
315+ appDelegatePrivate.maximizedLeft = false;
320− appDelegatePrivate.maximizedRight = false;
316+ appDelegatePrivate.maximizedRight = false;
321− }
317+ }
322− function maximizeLeft() {
318+ function maximizeLeft() {
323− appDelegatePrivate.minimized = false;
319+ appDelegatePrivate.minimized = false;
324− appDelegatePrivate.maximized = false;
320+ appDelegatePrivate.maximized = false;
325− appDelegatePrivate.maximizedLeft = true;
321+ appDelegatePrivate.maximizedLeft = true;
326− appDelegatePrivate.maximizedRight = false;
322+ appDelegatePrivate.maximizedRight = false;
327− }
323+ }
328− function maximizeRight() {
324+ function maximizeRight() {
329− appDelegatePrivate.minimized = false;
325+ appDelegatePrivate.minimized = false;
330− appDelegatePrivate.maximized = false;
326+ appDelegatePrivate.maximized = false;
331− appDelegatePrivate.maximizedLeft = false;
327+ appDelegatePrivate.maximizedLeft = false;
332− appDelegatePrivate.maximizedRight = true;
328+ appDelegatePrivate.maximizedRight = true;
333− }
329+ }
334− function minimize(animated) {
330+ function minimize(animated) {
335− animationsEnabled = (animated === undefined) || animated;
331+ animationsEnabled = (animated === undefined) || animated;
336− appDelegatePrivate.minimized = true;
332+ appDelegatePrivate.minimized = true;
337− }
333+ }
338− function restoreFromMaximized(animated) {
334+ function restoreFromMaximized(animated) {
339− animationsEnabled = (animated === undefined) || animated;
335+ animationsEnabled = (animated === undefined) || animated;
340− appDelegatePrivate.minimized = false;
336+ appDelegatePrivate.minimized = false;
341− appDelegatePrivate.maximized = false;
337+ appDelegatePrivate.maximized = false;
342− appDelegatePrivate.maximizedLeft = false;
338+ appDelegatePrivate.maximizedLeft = false;
343− appDelegatePrivate.maximizedRight = false;
339+ appDelegatePrivate.maximizedRight = false;
344− }
340+ }
345− function restore(animated) {
341+ function restore(animated) {
346− animationsEnabled = (animated === undefined) || animated;
342+ animationsEnabled = (animated === undefined) || animated;
347− appDelegatePrivate.minimized = false;
343+ appDelegatePrivate.minimized = false;
348− if (maximized)
344+ if (maximized)
349− maximize();
345+ maximize();
350− else if (maximizedLeft)
346+ else if (maximizedLeft)
351− maximizeLeft();
347+ maximizeLeft();
352− else if (maximizedRight)
348+ else if (maximizedRight)
353− maximizeRight();
349+ maximizeRight();
354− ApplicationManager.focusApplication(appId);
350+ ApplicationManager.focusApplication(appId);
355− }
351+ }
356
352
357− states: [
353+ states: [
358− State {
354+ State {
359− name: "fullscreen"; when: decoratedWindow.fullscreen
355+ name: "fullscreen"; when: decoratedWindow.fullscreen
360− extend: "maximized"
361− PropertyChanges {
362− target: appDelegate;
363− y: -PanelState.panelHeight
364− }
365− },
366− State {
367− name: "normal";
368− when: !appDelegate.maximized && !appDelegate.minimized
369− && !appDelegate.maximizedLeft && !appDelegate.maximizedRight
370− PropertyChanges {
356+ PropertyChanges {
371− target: appDelegate;
372− visuallyMinimized: false;
373− visuallyMaximized: false
374− }
375− },
376− State {
377− name: "maximized"; when: appDelegate.maximized && !appDelegate.minimized
378− PropertyChanges {
379− target: appDelegate;
357+ target: appDelegate;
380− x: 0; y: 0;
358+ x: 0; y: -PanelState.panelHeight
381− requestedWidth: appContainer.width; requestedHeight: appContainer.height;
382− visuallyMinimized: false;
383− visuallyMaximized: true
384− }
385− },
386− State {
387− name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
388− PropertyChanges { target: appDelegate; x: 0; y: PanelState.panelHeight;
389− requestedWidth: appContainer.width/2; requestedHeight: appContainer.height - PanelState.panelHeight }
390− },
391− State {
392− name: "maximizedRight"; when: appDelegate.maximizedRight && !appDelegate.minimized
393− PropertyChanges { target: appDelegate; x: appContainer.width/2; y: PanelState.panelHeight;
394− requestedWidth: appContainer.width/2; requestedHeight: appContainer.height - PanelState.panelHeight }
359+ requestedWidth: appContainer.width; requestedHeight: appContainer.height;
395− },
396− State {
397− name: "minimized"; when: appDelegate.minimized
398− PropertyChanges {
399− target: appDelegate;
400− x: -appDelegate.width / 2;
401− scale: units.gu(5) / appDelegate.width;
402− opacity: 0
403− visuallyMinimized: true;
404− visuallyMaximized: false
405− }
406 }
360 }
361+ },
362+ State {
363+ name: "normal";
364+ when: !appDelegate.maximized && !appDelegate.minimized
365+ && !appDelegate.maximizedLeft && !appDelegate.maximizedRight
366+ PropertyChanges {
367+ target: appDelegate;
368+ visuallyMinimized: false;
369+ visuallyMaximized: false
370+ }
371+ },
372+ State {
373+ name: "maximized"; when: appDelegate.maximized && !appDelegate.minimized
374+ PropertyChanges {
375+ target: appDelegate;
376+ x: root.leftMargin; y: 0;
377+ requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appContainer.height;
378+ visuallyMinimized: false;
379+ visuallyMaximized: true
380+ }
381+ },
382+ State {
383+ name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
384+ PropertyChanges { target: appDelegate; x: root.leftMargin; y: PanelState.panelHeight;
385+ requestedWidth: (appContainer.width - root.leftMargin)/2; requestedHeight: appContainer.height - PanelState.panelHeight }
386+ },
387+ State {
388+ name: "maximizedRight"; when: appDelegate.maximizedRight && !appDelegate.minimized
389+ PropertyChanges { target: appDelegate; x: (appContainer.width + root.leftMargin)/2; y: PanelState.panelHeight;
390+ requestedWidth: (appContainer.width - root.leftMargin)/2; requestedHeight: appContainer.height - PanelState.panelHeight }
391+ },
392+ State {
393+ name: "minimized"; when: appDelegate.minimized
394+ PropertyChanges {
395+ target: appDelegate;
396+ x: -appDelegate.width / 2;
397+ scale: units.gu(5) / appDelegate.width;
398+ opacity: 0
399+ visuallyMinimized: true;
400+ visuallyMaximized: false
401+ }
402+ }
407− ]
403+ ]
408− transitions: [
404+ transitions: [
409− Transition {
405+ Transition {
410− to: "normal"
406+ to: "normal"
411− enabled: appDelegate.animationsEnabled
407+ enabled: appDelegate.animationsEnabled
412− PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
408+ PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
409+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
410+ },
411+ Transition {
412+ to: "minimized"
413+ enabled: appDelegate.animationsEnabled
414+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
415+ SequentialAnimation {
413 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
416 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
414− },
415− Transition {
416− to: "minimized"
417− enabled: appDelegate.animationsEnabled
418− PropertyAction { target: appDelegate; property: "visuallyMaximized" }
419− SequentialAnimation {
420− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
421− PropertyAction { target: appDelegate; property: "visuallyMinimized" }
417+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
422− ScriptAction {
418+ ScriptAction {
423− script: {
419+ script: {
424− if (appDelegate.minimized) {
420+ if (appDelegate.minimized) {
425− priv.focusNext();
421+ priv.focusNext();
426− }
427 }
422 }
428 }
423 }
429 }
424 }
430− },
431− Transition {
432− to: "*" //maximized and fullscreen
433− enabled: appDelegate.animationsEnabled
434− PropertyAction { target: appDelegate; property: "visuallyMinimized" }
435− SequentialAnimation {
436− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
437− PropertyAction { target: appDelegate; property: "visuallyMaximized" }
438− }
439 }
425 }
440− ]
426+ },
441−
427+ Transition {
442− Binding {
428+ to: "*" //maximized and fullscreen
443− id: previewBinding
444− target: appDelegate
429+ enabled: appDelegate.animationsEnabled
445− property: "z"
430+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
446− value: ApplicationManager.count + 1
431+ SequentialAnimation {
447− when: index == spread.highlightedIndex && blurLayer.ready
432+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration }
433+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
434+ }
448 }
435 }
436+ ]
437+
438+ Binding {
439+ id: previewBinding
440+ target: appDelegate
441+ property: "z"
442+ value: ApplicationManager.count + 1
443+ when: index == spread.highlightedIndex && blurLayer.ready
444+ }
449
445
450− WindowResizeArea {
446+ WindowResizeArea {
451− objectName: "windowResizeArea"
447+ objectName: "windowResizeArea"
452− target: appDelegate
448+ target: appDelegate
453− minWidth: units.gu(10)
449+ minWidth: units.gu(10)
454− minHeight: units.gu(10)
450+ minHeight: units.gu(10)
455− borderThickness: units.gu(2)
451+ borderThickness: units.gu(2)
456− windowId: model.appId // FIXME: Change this to point to windowId once we have such a thing
452+ windowId: model.appId // FIXME: Change this to point to windowId once we have such a thing
457− screenWidth: appContainer.width
453+ screenWidth: appContainer.width
458− screenHeight: appContainer.height
454+ screenHeight: appContainer.height
459−
455+ leftMargin: root.leftMargin
456+
460− onPressed: { ApplicationManager.focusApplication(model.appId) }
457+ onPressed: { ApplicationManager.focusApplication(model.appId) }
461− }
458+ }
462
459
463− DecoratedWindow {
460+ DecoratedWindow {
464− id: decoratedWindow
461+ id: decoratedWindow
465− objectName: "decoratedWindow"
462+ objectName: "decoratedWindow"
466− anchors.left: appDelegate.left
463+ anchors.left: appDelegate.left
467− anchors.top: appDelegate.top
464+ anchors.top: appDelegate.top
468− application: ApplicationManager.get(index)
465+ application: ApplicationManager.get(index)
469− active: ApplicationManager.focusedApplicationId === model.appId
466+ active: ApplicationManager.focusedApplicationId === model.appId
470− focus: true
467+ focus: true
471−
468+
472− onClose: ApplicationManager.stopApplication(model.appId)
469+ onClose: ApplicationManager.stopApplication(model.appId)
473− onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
470+ onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight
474− ? appDelegate.restoreFromMaximized() : appDelegate.maximize()
471+ ? appDelegate.restoreFromMaximized() : appDelegate.maximize()
475− onMinimize: appDelegate.minimize()
472+ onMinimize: appDelegate.minimize()
476− onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
473+ onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
477− }
478 }
474 }
479 }
475 }
480 }
476 }
@@ -482,8 +478,8 @@ AbstractStage {
482
478
483 BlurLayer {
479 BlurLayer {
484 id: blurLayer
480 id: blurLayer
485− anchors.fill: stageContainer
481+ anchors.fill: appContainer
486− source: stageContainer
482+ source: appContainer
487 visible: false
483 visible: false
488 }
484 }
489
485
@@ -534,7 +530,7 @@ AbstractStage {
534 DesktopSpread {
530 DesktopSpread {
535 id: spread
531 id: spread
536 objectName: "spread"
532 objectName: "spread"
537− anchors.fill: stageContainer
533+ anchors.fill: appContainer
538 workspace: appContainer
534 workspace: appContainer
539 focus: state == "altTab"
535 focus: state == "altTab"
540 altTabPressed: root.altTabPressed
536 altTabPressed: root.altTabPressed
qml/Stages/WindowResizeArea.qml+3−2
@@ -40,6 +40,7 @@ MouseArea {
40 property int defaultHeight: units.gu(50)
40 property int defaultHeight: units.gu(50)
41 property int screenWidth: 0
41 property int screenWidth: 0
42 property int screenHeight: 0
42 property int screenHeight: 0
43+ property int leftMargin: 0
43
44
44 QtObject {
45 QtObject {
45 id: priv
46 id: priv
@@ -72,9 +73,9 @@ MouseArea {
72 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
73 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
73 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));
74 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));
74
75
75− target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth);
76+ target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin);
76 target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight);
77 target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight);
77− target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - target.requestedWidth), 0)
78+ target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin)
78 target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight)
79 target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight)
79
80
80 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
81 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
tests/qmltests/tst_Shell.qml+30−25
@@ -2113,25 +2113,50 @@ Rectangle {
2113 tryCompare(launcher, "focus", true)
2113 tryCompare(launcher, "focus", true)
2114 }
2114 }
2115
2115
2116− function test_lockedOutLauncherShrinksStage() {
2116+ function test_lockedOutLauncherAddsMarginsToMaximized() {
2117 loadShell("desktop");
2117 loadShell("desktop");
2118 shell.usageScenario = "desktop";
2118 shell.usageScenario = "desktop";
2119 waitForRendering(shell);
2119 waitForRendering(shell);
2120−
2121 var appContainer = findChild(shell, "appContainer");
2120 var appContainer = findChild(shell, "appContainer");
2122 var launcher = findChild(shell, "launcher");
2121 var launcher = findChild(shell, "launcher");
2123
2122
2123+ var app = ApplicationManager.startApplication("music-app");
2124+ waitUntilAppWindowIsFullyLoaded(app);
2125+ var appDelegate = findChild(appContainer, "appDelegate_music-app");
2126+ appDelegate.maximize();
2127+ tryCompare(appDelegate, "visuallyMaximized", true);
2128+ waitForRendering(shell);
2129+
2124 GSettingsController.setAutohideLauncher(true);
2130 GSettingsController.setAutohideLauncher(true);
2125 waitForRendering(shell)
2131 waitForRendering(shell)
2126− var hiddenSize = appContainer.width;
2132+ var hiddenSize = appDelegate.width;
2127
2133
2128 GSettingsController.setAutohideLauncher(false);
2134 GSettingsController.setAutohideLauncher(false);
2129 waitForRendering(shell)
2135 waitForRendering(shell)
2130− var shownSize = appContainer.width;
2136+ var shownSize = appDelegate.width;
2131
2137
2132 compare(shownSize + launcher.panelWidth, hiddenSize);
2138 compare(shownSize + launcher.panelWidth, hiddenSize);
2133 }
2139 }
2134
2140
2141+ function test_fullscreenAppHidesLockedOutLauncher() {
2142+ loadShell("desktop");
2143+ shell.usageScenario = "desktop";
2144+
2145+ var launcher = findChild(shell, "launcher");
2146+ var launcherPanel = findChild(launcher, "launcherPanel");
2147+
2148+ GSettingsController.setAutohideLauncher(false);
2149+ waitForRendering(shell)
2150+
2151+ tryCompare(launcher, "lockedVisible", true);
2152+
2153+ var cameraApp = ApplicationManager.startApplication("camera-app");
2154+ waitUntilAppWindowIsFullyLoaded(cameraApp);
2155+
2156+ tryCompare(launcher, "lockedVisible", false);
2157+ }
2158+
2159+
2135 function test_inputEventsOnEdgesEndUpInAppSurface_data() {
2160 function test_inputEventsOnEdgesEndUpInAppSurface_data() {
2136 return [
2161 return [
2137 { tag: "phone", repeaterName: "spreadRepeater" },
2162 { tag: "phone", repeaterName: "spreadRepeater" },
@@ -2143,7 +2168,7 @@ Rectangle {
2143 function test_inputEventsOnEdgesEndUpInAppSurface(data) {
2168 function test_inputEventsOnEdgesEndUpInAppSurface(data) {
2144 loadShell(data.tag);
2169 loadShell(data.tag);
2145 shell.usageScenario = data.tag;
2170 shell.usageScenario = data.tag;
2146−
2171+ waitForRendering(shell);
2147 swipeAwayGreeter();
2172 swipeAwayGreeter();
2148
2173
2149 // Let's open a fullscreen app
2174 // Let's open a fullscreen app
@@ -2173,25 +2198,5 @@ Rectangle {
2173 compare(topmostSurfaceItem.touchPressCount, 2);
2198 compare(topmostSurfaceItem.touchPressCount, 2);
2174 compare(topmostSurfaceItem.touchReleaseCount, 2);
2199 compare(topmostSurfaceItem.touchReleaseCount, 2);
2175 }
2200 }
2176−
2177− function test_fullscreenAppHidesLockedOutLauncher() {
2178− loadShell("desktop");
2179− shell.usageScenario = "desktop";
2180− waitForRendering(shell);
2181−
2182− var appContainer = findChild(shell, "appContainer");
2183− var launcher = findChild(shell, "launcher");
2184− var launcherPanel = findChild(launcher, "launcherPanel");
2185−
2186− GSettingsController.setAutohideLauncher(false);
2187− waitForRendering(shell)
2188−
2189− tryCompare(appContainer, "width", shell.width - launcherPanel.width);
2190−
2191− var cameraApp = ApplicationManager.startApplication("camera-app");
2192− waitUntilAppWindowIsFullyLoaded(cameraApp);
2193−
2194− tryCompare(appContainer, "width", shell.width);
2195− }
2196 }
2201 }
2197}
2202}