on xenial help sign in
merge 1238837 branch
commit1c0e986531b3438ecc0e3a6feb244013c681e716 authorOmer Akram <om26er@ubuntu.com> dateMon 14 Oct 2013, 15:51 (13 years ago) parentdaa342a37fc054
2 files changed+11−9
Dash/Apps/RunningApplicationTile.qml+6−3 tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml+5−6
Dash/Apps/RunningApplicationTile.qml+6−3
@@ -39,9 +39,7 @@ AbstractButton {
3939 property bool terminationModeEnabled: false
4040
4141 onClicked: {
42− if (terminationModeEnabled)
43− requestedApplicationTermination(application)
44− else
42+ if (!terminationModeEnabled)
4543 requestedApplicationActivation(application)
4644 }
4745
@@ -133,5 +131,10 @@ AbstractButton {
133131 width: units.gu(6)
134132 id: closeIcon
135133 enabled: root.terminationModeEnabled
134+
135+ MouseArea {
136+ anchors { fill: parent; margins: -units.gu(1) }
137+ onClicked: requestedApplicationTermination(application)
138+ }
136139 }
137140}
tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml+5−6
@@ -195,8 +195,8 @@ Item {
195195 !runningApplicationsGrid.terminationModeEnabled
196196 }
197197
198− // While on termination mode, clicking a running application tile causes the
199− // corresponding application to be terminated.
198+ // While on termination mode, clicking a running application tile, outside of
199+ // the close icon should do nothing
200200 function test_clickTileToTerminateApp() {
201201 runningApplicationsGrid.terminationModeEnabled = true
202202
@@ -207,11 +207,10 @@ Item {
207207
208208 mouseClick(calendarTile, calendarTile.width/2, calendarTile.height/2)
209209
210− verify(!fakeRunningAppsModel.contains("calendar"))
210+ verify(fakeRunningAppsModel.contains("calendar"))
211211
212− // The tile for the Calendar app should eventually vanish since the
213− // application has been terminated
214− tryCompareFunction(checkCalendarTileExists, false)
212+ // The tile for the Calendar app should stay there
213+ tryCompareFunction(checkCalendarTileExists, true)
215214 }
216215
217216 function checkCalendarTileExists() {