~3v1n0/bamf/ignore-unneeded-windows

« back to all changes in this revision

Viewing changes to src/bamf-matcher.c

  • Committer: Marco Trevisan (Treviño)
  • Date: 2012-03-19 18:10:01 UTC
  • Revision ID: mail@3v1n0.net-20120319181001-xkmqcdswpm90wg88
BamfMatcher: ignore toolbar, menu, utility and dock windows.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1951
1951
  g_return_if_fail (BAMF_IS_MATCHER (self));
1952
1952
  g_return_if_fail (BAMF_IS_LEGACY_WINDOW (window));
1953
1953
 
1954
 
  if (bamf_legacy_window_get_window_type (window) == BAMF_WINDOW_DESKTOP)
 
1954
  BamfWindowType win_type = bamf_legacy_window_get_window_type (window);
 
1955
 
 
1956
  if (win_type == BAMF_WINDOW_TOOLBAR || win_type == BAMF_WINDOW_UTILITY ||
 
1957
      win_type == BAMF_WINDOW_MENU || win_type == BAMF_WINDOW_DOCK)
 
1958
    {
 
1959
      return;
 
1960
    }
 
1961
 
 
1962
  if (win_type == BAMF_WINDOW_DESKTOP)
1955
1963
    {
1956
1964
      BamfWindow *bamfwindow = bamf_window_new (window);
1957
1965
      bamf_matcher_register_view_stealing_ref (self, BAMF_VIEW (bamfwindow));
1961
1969
 
1962
1970
  if (is_open_office_window (self, window))
1963
1971
    {
1964
 
      BamfWindowType win_type = bamf_legacy_window_get_window_type (window);
1965
 
 
1966
 
      if (win_type == BAMF_WINDOW_SPLASHSCREEN || win_type == BAMF_WINDOW_TOOLBAR)
 
1972
      if (win_type == BAMF_WINDOW_SPLASHSCREEN)
1967
1973
        {
1968
1974
          return;
1969
1975
        }