Merge lp:~3v1n0/bamf/running-applications-changed-signal-fix into lp:bamf/0.4

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 462
Merged at revision: 464
Proposed branch: lp:~3v1n0/bamf/running-applications-changed-signal-fix
Merge into: lp:bamf/0.4
Diff against target: 49 lines (+7/-4)
1 file modified
src/bamf-matcher.c (+7/-4)
To merge this branch: bzr merge lp:~3v1n0/bamf/running-applications-changed-signal-fix
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Michal Hruby Pending
Review via email: mp+103858@code.launchpad.net

Commit message

BamfMatcher must emit the "running-applications-changed" signal for closed applications.

Description of the change

BamfMatcher must emit the "running-applications-changed" signal for closed applications.

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

+1, the signals are now properly emitted. But we should have a test for this to prevent regressions.

Revision history for this message
Gord Allott (gordallott) :
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/bamf-matcher.c'
2--- src/bamf-matcher.c 2012-04-20 17:36:00 +0000
3+++ src/bamf-matcher.c 2012-04-27 11:57:18 +0000
4@@ -210,6 +210,7 @@
5 static void bamf_matcher_prepare_path_change (BamfMatcher *self, const gchar *desktop_file, ViewChangeType change_type)
6 {
7 BamfMatcherPrivate *priv;
8+ BamfApplication *app;
9
10 if (desktop_file == NULL) return;
11
12@@ -219,7 +220,9 @@
13
14 /* the app was already running (ADDED) / had more instances which are still
15 * there (REMOVED) */
16- if (bamf_matcher_get_application_by_desktop_file (self, desktop_file))
17+ app = bamf_matcher_get_application_by_desktop_file (self, desktop_file);
18+
19+ if (BAMF_IS_APPLICATION (app) && bamf_view_is_running (BAMF_VIEW (app)))
20 {
21 return;
22 }
23@@ -1528,7 +1531,7 @@
24 is_web_app_window (BamfMatcher *self, BamfLegacyWindow *window)
25 {
26 const char *window_class = bamf_legacy_window_get_class_name (window);
27- const char *instance_name = bamf_legacy_window_get_class_instance_name(window);
28+ const char *instance_name = bamf_legacy_window_get_class_instance_name (window);
29
30 // Chrome/Chromium uses url wm_class strings to represent its web apps.
31 // These apps will still have the same parent pid and hints as the main chrome
32@@ -1639,7 +1642,7 @@
33 {
34 desktop_class = g_hash_table_lookup (priv->desktop_class_table, desktop_file);
35
36- if (!known_desktop_class || g_strcmp0 (desktop_class, desktop_file) == 0)
37+ if (!known_desktop_class || g_strcmp0 (desktop_class, instance_name) == 0)
38 {
39 desktop_files = g_list_prepend (desktop_files, desktop_file);
40 }
41@@ -1730,7 +1733,7 @@
42 }
43 }
44 }
45-
46+
47 desktop_files = g_list_insert_before (desktop_files, last, desktop_file);
48 }
49 else

Subscribers

People subscribed via source and target branches