Merge lp:~lukas-kde/unity8/fix-launcher-surface-count-lp1669047 into lp:unity8

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Michael Zanetti
Approved revision: 2872
Merged at revision: 2902
Proposed branch: lp:~lukas-kde/unity8/fix-launcher-surface-count-lp1669047
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/surfacetitles-in-quicklist
Diff against target: 27 lines (+9/-7)
1 file modified
plugins/Unity/Launcher/launchermodel.cpp (+9/-7)
To merge this branch: bzr merge lp:~lukas-kde/unity8/fix-launcher-surface-count-lp1669047
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) Needs Information
Unity8 CI Bot continuous-integration Approve
Michael Zanetti (community) Approve
Review via email: mp+320487@code.launchpad.net

Commit message

Only take normal and dialog surface types into account for launcher items

Description of the change

Prereq-archive: ppa:ci-train-ppa-service/2514

Only take normal and dialog surface types into account for launcher items

* Are there any related MPs required for this MP to build/function as expected? Please list.

Yes, prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

 * If you changed the UI, has there been a design review?

N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
2871. By Lukáš Tinkl

obviously, we want to clear the list too

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2871
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3482/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4595
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2775
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2775
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4623
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4450
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4450/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4450
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4450/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4450
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4450/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4450
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4450/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4450
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4450/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4450
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4450/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3482/rebuild

review: Approve (continuous-integration)
2872. By Lukáš Tinkl

merge trunk

Revision history for this message
Michael Zanetti (mzanetti) wrote :

tested it, works fine. code looks good. waiting for CI for top approval.

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2872
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3526/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4668
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2820
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2820
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4696
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4519/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4519
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4519/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3526/rebuild

review: Approve (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Should it also check if the surface is top-level?

review: Needs Information

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Unity/Launcher/launchermodel.cpp'
2--- plugins/Unity/Launcher/launchermodel.cpp 2017-03-16 10:46:15 +0000
3+++ plugins/Unity/Launcher/launchermodel.cpp 2017-03-24 11:16:34 +0000
4@@ -573,14 +573,16 @@
5 QList<QPair<QString, QString> > surfaces;
6 for (int i = 0; i < app->surfaceList()->count(); ++i) {
7 MirSurfaceInterface* iface = app->surfaceList()->get(i);
8- // Avoid duplicate connections, so let's just disconnect first to be sure
9- disconnect(iface, &MirSurfaceInterface::nameChanged, this, &LauncherModel::updateSurfaceListForSurface);
10- connect(iface, &MirSurfaceInterface::nameChanged, this, &LauncherModel::updateSurfaceListForSurface);
11- QString name = iface->name();
12- if (name.isEmpty()) {
13- name = app->name();
14+ if (iface->type() == Mir::NormalType || iface->type() == Mir::DialogType) {
15+ // Avoid duplicate connections, so let's just disconnect first to be sure
16+ disconnect(iface, &MirSurfaceInterface::nameChanged, this, &LauncherModel::updateSurfaceListForSurface);
17+ connect(iface, &MirSurfaceInterface::nameChanged, this, &LauncherModel::updateSurfaceListForSurface);
18+ QString name = iface->name();
19+ if (name.isEmpty()) {
20+ name = app->name();
21+ }
22+ surfaces.append({iface->persistentId(), name});
23 }
24- surfaces.append({iface->persistentId(), name});
25 }
26 item->setSurfaces(surfaces);
27 Q_EMIT dataChanged(index(idx), index(idx), {RoleSurfaceCount});

Subscribers

People subscribed via source and target branches