[d-feet] Revert "Don't use Wnck to get app-icons under non-X11"



commit 8490f3063e359c8833af51712114754b4cdd7ab8
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Jun 7 12:44:57 2017 +0200

    Revert "Don't use Wnck to get app-icons under non-X11"
    
    Since we are completely ignoring Wnck on non-X11, there is no need to
    guard against the default Wnck.Screen being None.
    
    This reverts commit c9d202ede2474f4a748be78fac78ba077e958399.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763615

 src/dfeet/wnck_utils.py |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/dfeet/wnck_utils.py b/src/dfeet/wnck_utils.py
index 9d103ef..555498e 100644
--- a/src/dfeet/wnck_utils.py
+++ b/src/dfeet/wnck_utils.py
@@ -32,18 +32,17 @@ class IconTable(object):
 
         if has_libwnck:
             screen = Wnck.Screen.get_default()
-            if screen is not None:
-                Wnck.Screen.force_update(screen)
-                screen.connect('application_opened', self.on_app_open)
-                screen.connect('application_closed', self.on_app_close)
-
-                for w in screen.get_windows():
-                    app = w.get_application()
-                    pid = app.get_pid()
-                    icon = app.get_mini_icon()
-
-                    if pid not in self.app_map.keys():
-                        self.app_map[pid] = icon
+            Wnck.Screen.force_update(screen)
+            screen.connect('application_opened', self.on_app_open)
+            screen.connect('application_closed', self.on_app_close)
+
+            for w in screen.get_windows():
+                app = w.get_application()
+                pid = app.get_pid()
+                icon = app.get_mini_icon()
+
+                if pid not in self.app_map.keys():
+                    self.app_map[pid] = icon
 
     def on_app_open(self, screen, app):
         icon = app.get_mini_icon()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]