on xenial help sign in
Better solution is to override starting application's stage, if it wants to be sidestage and there is no sidestage
e98e92dGerry Boland
Components/ApplicationManagerWrapper.qml+11−3
@@ -50,7 +50,7 @@ Item {
50 mainStageFocusedApplication = null;
50 mainStageFocusedApplication = null;
51 sideStageFocusedApplication = null;
51 sideStageFocusedApplication = null;
52 } else {
52 } else {
53− if (app.stage == ApplicationInfo.MainStage || !sideStageEnabled) {
53+ if (app.stage == ApplicationInfo.MainStage) {
54 mainStageFocusedApplication = app;
54 mainStageFocusedApplication = app;
55 // possible the side stage app being unfocused fired this signal, so check for it
55 // possible the side stage app being unfocused fired this signal, so check for it
56 if (sideStageFocusedApplication && !sideStageFocusedApplication.focused)
56 if (sideStageFocusedApplication && !sideStageFocusedApplication.focused)
@@ -64,7 +64,15 @@ Item {
64 }
64 }
65 }
65 }
66
66
67+ onFocusRequested: {
68+ // if no side stage enabled, override application's stage parameter
69+ var app = ApplicationManager.findApplication(appId);
70+ if (app && app.stage === ApplicationInfo.SideStage && !sideStageEnabled) {
71+ app.stage = ApplicationInfo.MainStage;
72+ }
73+
67− onFocusRequested: root.focusRequested(appId);
74+ root.focusRequested(appId);
75+ }
68 }
76 }
69
77
70 function activateApplication(desktopFile, argument) {
78 function activateApplication(desktopFile, argument) {
@@ -143,7 +151,7 @@ Item {
143 var app = ApplicationManager.get(i);
151 var app = ApplicationManager.get(i);
144
152
145 // if stage not specified and using sidestage, return whichever app running on either stage
153 // if stage not specified and using sidestage, return whichever app running on either stage
146− if (app.appId == appId && (!sideStageEnabled || stage == undefined || app.stage == stage)) {
154+ if (app.appId == appId && (stage == undefined || app.stage == stage)) {
147 return app;
155 return app;
148 }
156 }
149 }
157 }