on xenial help sign in
Block mouse events under scope overview bottombar Fixes: 1362206
811b849Albert Astals
qml/Dash/ScopesOverview.qml+6
@@ -386,6 +386,7 @@ Item {
386
386
387 Rectangle {
387 Rectangle {
388 id: bottomBar
388 id: bottomBar
389+ objectName: "bottomBar"
389 color: "black"
390 color: "black"
390 height: units.gu(8)
391 height: units.gu(8)
391 width: parent.width
392 width: parent.width
@@ -400,6 +401,11 @@ Item {
400 }
401 }
401 }
402 }
402
403
404+ MouseArea {
405+ // Just eat any other press since this parent is black opaque
406+ anchors.fill: parent
407+ }
408+
403 AbstractButton {
409 AbstractButton {
404 objectName: "scopesOverviewDoneButton"
410 objectName: "scopesOverviewDoneButton"
405 width: Math.max(label.width + units.gu(2), units.gu(10))
411 width: Math.max(label.width + units.gu(2), units.gu(10))
tests/qmltests/Dash/tst_Dash.qml+8−1
@@ -189,6 +189,14 @@ Item {
189 var scopesOverviewAllView = findChild(dash, "scopesOverviewRepeaterChild1");
189 var scopesOverviewAllView = findChild(dash, "scopesOverviewRepeaterChild1");
190 tryCompare(scopesOverviewAllView, "enabled", true);
190 tryCompare(scopesOverviewAllView, "enabled", true);
191
191
192+ // Click in the middle of the black bar (nothing happens)
193+ var bottomBar = findChild(scopesOverview, "bottomBar");
194+ mouseClick(bottomBar, bottomBar.width / 2, bottomBar.height / 2);
195+ // Check temp scope is not there
196+ var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
197+ expectFailContinue("", "Clicking in the middle of bottom bar should not open a temp scope");
198+ tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
199+
192 // Click on a temp scope
200 // Click on a temp scope
193 var tempScopeCard = findChild(scopesOverviewAllView, "delegate1");
201 var tempScopeCard = findChild(scopesOverviewAllView, "delegate1");
194 mouseClick(tempScopeCard, 0, 0);
202 mouseClick(tempScopeCard, 0, 0);
@@ -198,7 +206,6 @@ Item {
198 compare(overviewDragHandle.enabled, false);
206 compare(overviewDragHandle.enabled, false);
199
207
200 // Check temp scope is there
208 // Check temp scope is there
201− var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
202 tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
209 tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
203 tryCompare(scopesOverviewTempScopeItem, "enabled", true);
210 tryCompare(scopesOverviewTempScopeItem, "enabled", true);
204
211