on xenial help sign in
Block mouse events under scope overview bottombar Fixes: 1362206

Approved by: Andrea Cimitan

commit811b8491a9ab4b6574f86521a44377bc2b6a7518 authorAlbert Astals <albert.astals@canonical.com> dateMon 8 Sep 2014, 14:12 (12 years ago) parent2c978cd17fc1cb
2 files changed+14−1
qml/Dash/ScopesOverview.qml+6 tests/qmltests/Dash/tst_Dash.qml+8−1
qml/Dash/ScopesOverview.qml+6
@@ -386,6 +386,7 @@ Item {
386386
387387 Rectangle {
388388 id: bottomBar
389+ objectName: "bottomBar"
389390 color: "black"
390391 height: units.gu(8)
391392 width: parent.width
@@ -400,6 +401,11 @@ Item {
400401 }
401402 }
402403
404+ MouseArea {
405+ // Just eat any other press since this parent is black opaque
406+ anchors.fill: parent
407+ }
408+
403409 AbstractButton {
404410 objectName: "scopesOverviewDoneButton"
405411 width: Math.max(label.width + units.gu(2), units.gu(10))
tests/qmltests/Dash/tst_Dash.qml+8−1
@@ -189,6 +189,14 @@ Item {
189189 var scopesOverviewAllView = findChild(dash, "scopesOverviewRepeaterChild1");
190190 tryCompare(scopesOverviewAllView, "enabled", true);
191191
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+
192200 // Click on a temp scope
193201 var tempScopeCard = findChild(scopesOverviewAllView, "delegate1");
194202 mouseClick(tempScopeCard, 0, 0);
@@ -198,7 +206,6 @@ Item {
198206 compare(overviewDragHandle.enabled, false);
199207
200208 // Check temp scope is there
201− var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
202209 tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
203210 tryCompare(scopesOverviewTempScopeItem, "enabled", true);
204211