Merge lp:~azzar1/unity/fix-blinking-fm-icon into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4147
Proposed branch: lp:~azzar1/unity/fix-blinking-fm-icon
Merge into: lp:unity
Prerequisite: lp:~azzar1/unity/fix-unpinned-nautilus
Diff against target: 43 lines (+5/-3)
2 files modified
launcher/FileManagerLauncherIcon.cpp (+4/-2)
unity-shared/PluginAdapter.cpp (+1/-1)
To merge this branch: bzr merge lp:~azzar1/unity/fix-blinking-fm-icon
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+299160@code.launchpad.net

Commit message

FileManagerLauncherIcon: Don't trust the Quirk::VISIBLE in the ctor.

Make sure a window is valid/mapped before considering it a manager storage window.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Thank you.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/FileManagerLauncherIcon.cpp'
2--- launcher/FileManagerLauncherIcon.cpp 2016-07-01 12:10:33 +0000
3+++ launcher/FileManagerLauncherIcon.cpp 2016-07-06 10:56:17 +0000
4@@ -46,6 +46,9 @@
5 // We disconnect from ApplicationLauncherIcon app signals, as we manage them manually
6 signals_conn_.Clear();
7
8+ SetQuirk(Quirk::VISIBLE, false);
9+ SkipQuirkAnimation(Quirk::VISIBLE);
10+
11 signals_conn_.Add(app_->desktop_file.changed.connect([this](std::string const& desktop_file) {
12 LOG_DEBUG(logger) << tooltip_text() << " desktop_file now " << desktop_file;
13 UpdateDesktopFile();
14@@ -74,7 +77,6 @@
15 _source_manager.Remove(ICON_REMOVE_TIMEOUT);
16 }));
17
18-
19 UpdateStorageWindows();
20 }
21
22@@ -120,7 +122,7 @@
23
24 for (auto const& app_win : ApplicationLauncherIcon::GetManagedWindows())
25 {
26- if (IsLocationManaged(file_manager_->LocationForWindow(app_win)))
27+ if (WindowManager::Default().IsWindowMapped(app_win->window_id()) && IsLocationManaged(file_manager_->LocationForWindow(app_win)))
28 fm_windows.push_back(app_win);
29 }
30
31
32=== modified file 'unity-shared/PluginAdapter.cpp'
33--- unity-shared/PluginAdapter.cpp 2016-03-18 18:58:26 +0000
34+++ unity-shared/PluginAdapter.cpp 2016-07-06 10:56:17 +0000
35@@ -630,7 +630,7 @@
36 CompWindow* window = m_Screen->findWindow(window_id);
37 if (window)
38 return window->mapNum () > 0;
39- return true;
40+ return false;
41 }
42
43 bool PluginAdapter::IsWindowVisible(Window window_id) const