@@ -170,5 +170,28 @@ Rectangle {
170170 tap(webbrowserWindow);
171171 compare(webbrowserWindow.application.session.surface.activeFocus, true);
172172 }
173+
174+ function test_tappingOnWindowTitleChangesFocusedApp() {
175+ webbrowserCheckBox.checked = true;
176+ waitUntilAppSurfaceShowsUp(webbrowserCheckBox.appId);
177+
178+ var webbrowserWindow = findChild(desktopStage, "decoratedWindow_" + webbrowserCheckBox.appId);
179+ verify(webbrowserWindow);
180+ var webbrowserWindowTitle = findChild(webbrowserWindow, "windowDecorationTitle");
181+ verify(webbrowserWindowTitle);
182+ var dashWindow = findChild(desktopStage, "decoratedWindow_unity8-dash");
183+ verify(dashWindow);
184+ var dashWindowTitle = findChild(dashWindow, "windowDecorationTitle");
185+ verify(dashWindowTitle);
186+
187+ // some sanity check
188+ compare(rectsOverlap(dashWindow, webbrowserWindow), false);
189+
190+ tap(dashWindowTitle);
191+ compare(dashWindow.application.session.surface.activeFocus, true);
192+
193+ tap(webbrowserWindowTitle);
194+ compare(webbrowserWindow.application.session.surface.activeFocus, true);
195+ }
173196 }
174197}