Merge lp:~robertcarr/bamf/ignore-shell-windows into lp:bamf/0.4

Proposed by Robert Carr
Status: Rejected
Rejected by: Robert Carr
Proposed branch: lp:~robertcarr/bamf/ignore-shell-windows
Merge into: lp:bamf/0.4
Diff against target: 46 lines (+16/-4)
1 file modified
src/bamf-matcher.c (+16/-4)
To merge this branch: bzr merge lp:~robertcarr/bamf/ignore-shell-windows
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+98242@code.launchpad.net

Commit message

Ignore BAMF_WINDOW_UTILITY and BAMF_WINDOW_DOCK windows for application matching.

Description of the change

Ignore UTILITY and DOCK windows for application matching.

To post a comment you must log in.
455. By Robert Carr

Cleanup

Unmerged revisions

455. By Robert Carr

Cleanup

454. By Robert Carr

Ensure that we ignore shell windoows in bamf-matcher

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-02-10 20:05:54 +0000
3+++ src/bamf-matcher.c 2012-03-19 18:20:23 +0000
4@@ -1926,10 +1926,20 @@
5 static void
6 handle_window_opened (BamfLegacyScreen * screen, BamfLegacyWindow * window, BamfMatcher *self)
7 {
8+ BamfWindowType window_type;
9+
10 g_return_if_fail (BAMF_IS_MATCHER (self));
11 g_return_if_fail (BAMF_IS_LEGACY_WINDOW (window));
12
13- if (bamf_legacy_window_get_window_type (window) == BAMF_WINDOW_DESKTOP)
14+ window_type = bamf_legacy_window_get_window_type (window);
15+
16+ /* Ignore shell windows*/
17+ if (window_type == BAMF_WINDOW_DOCK || window_type == BAMF_WINDOW_UTILITY)
18+ {
19+ return;
20+ }
21+
22+ else if (window_type == BAMF_WINDOW_DESKTOP)
23 {
24 BamfWindow *bamfwindow;
25
26@@ -1940,7 +1950,7 @@
27 return;
28 }
29
30- if (is_open_office_window (self, window))
31+ else if (is_open_office_window (self, window))
32 {
33 BamfWindowType win_type = bamf_legacy_window_get_window_type (window);
34
35@@ -1979,8 +1989,10 @@
36
37 g_free (old_hint);
38 }
39-
40- /* we have a window who is ready to be matched */
41+
42+ /*
43+ * We have a window who is ready to be matched.
44+ */
45 handle_raw_window (self, window);
46 }
47

Subscribers

People subscribed via source and target branches