[gnome-shell] [workspaces] Don't crash trying to get an icon for untracked app



commit 51c41aed90236d8fab5b73baa89684c4e0e3a8b4
Author: Colin Walters <walters verbum org>
Date:   Thu Oct 15 16:17:18 2009 -0400

    [workspaces] Don't crash trying to get an icon for untracked app
    
    Use ShellApp directly rather than trying to handle null-safety
    with .get_info().

 js/ui/workspaces.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/workspaces.js b/js/ui/workspaces.js
index 217adcf..3be0ab3 100644
--- a/js/ui/workspaces.js
+++ b/js/ui/workspaces.js
@@ -1227,13 +1227,13 @@ Workspace.prototype = {
     _createWindowIcon: function(window) {
         let appSys = Shell.AppSystem.get_default();
         let appMon = Shell.AppMonitor.get_default()
-        let appInfo = appMon.get_window_app(window.metaWindow).get_info();
+        let app = appMon.get_window_app(window.metaWindow);
         let iconTexture = null;
         // The design is application based, so prefer the application
         // icon here if we have it.  FIXME - should move this fallback code
         // into ShellAppMonitor.
-        if (appInfo) {
-            iconTexture = appInfo.create_icon_texture(48);
+        if (app) {
+            iconTexture = app.create_icon_texture(48);
         } else {
             let icon = window.metaWindow.icon;
             iconTexture = new Clutter.Texture({ width: 48,



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