on xenial help sign in
Don't change/set alert-state, if the app is focused.
d087e85Mirco Müller
plugins/Unity/Launcher/launchermodel.cpp+4−2
@@ -94,8 +94,10 @@ void LauncherModel::alert(const QString &appId, bool alerting) {
94 if (index >= 0) {
94 if (index >= 0) {
95 QModelIndex modelIndex = this->index(index);
95 QModelIndex modelIndex = this->index(index);
96 LauncherItem *item = m_list.at(index);
96 LauncherItem *item = m_list.at(index);
97+ if (!item->focused()) {
97− item->setAlerting(alerting);
98+ item->setAlerting(alerting);
98− Q_EMIT dataChanged(modelIndex, modelIndex, QVector<int>() << RoleAlerting);
99+ Q_EMIT dataChanged(modelIndex, modelIndex, QVector<int>() << RoleAlerting);
100+ }
99 }
101 }
100}
102}
101
103
qml/Launcher/LauncherPanel.qml−1
@@ -431,7 +431,6 @@ Rectangle {
431 }
431 }
432
432
433 onPositionChanged: {
433 onPositionChanged: {
434− print("position:", mouseX, "/", mouseY)
435 if (draggedIndex >= 0) {
434 if (draggedIndex >= 0) {
436 if (!selectedItem.dragging) {
435 if (!selectedItem.dragging) {
437 var distance = Math.max(Math.abs(mouseX - startX), Math.abs(mouseY - startY))
436 var distance = Math.max(Math.abs(mouseX - startX), Math.abs(mouseY - startY))
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+4−2
@@ -124,8 +124,10 @@ void MockLauncherModel::alert(const QString &appId, bool alerting) {
124 if (index >= 0) {
124 if (index >= 0) {
125 QModelIndex modelIndex = this->index(index);
125 QModelIndex modelIndex = this->index(index);
126 MockLauncherItem *item = m_list.at(index);
126 MockLauncherItem *item = m_list.at(index);
127+ if (!item->focused()) {
127− item->setAlerting(alerting);
128+ item->setAlerting(alerting);
128− Q_EMIT dataChanged(modelIndex, modelIndex, QVector<int>() << RoleAlerting);
129+ Q_EMIT dataChanged(modelIndex, modelIndex, QVector<int>() << RoleAlerting);
130+ }
129 }
131 }
130}
132}
131
133
tests/qmltests/Launcher/tst_Launcher.qml+1−1
@@ -139,7 +139,7 @@ Item {
139 width: units.gu(4)
139 width: units.gu(4)
140 height: units.gu(4)
140 height: units.gu(4)
141 autoSize: true
141 autoSize: true
142− text: "gallery-app"
142+ text: "dialer-app"
143 maximumLineCount: 1
143 maximumLineCount: 1
144 }
144 }
145
145