[gnome-shell] ShellWindowTracker: Ensure WM_CLASS remains canonical if it matches



commit f4852d72642b3f009c94c5115bdd97c4a574beef
Author: Colin Walters <walters verbum org>
Date:   Tue Apr 5 12:48:44 2011 -0400

    ShellWindowTracker: Ensure WM_CLASS remains canonical if it matches
    
    I unintentionally made .desktop->pid association "win" over
    WM_CLASS.  Fixing this makes the case of ancillary .desktop file
    entry points (e.g. gnome-control-center's various shortcut .desktop
    files) correctly show System Settings, and not whatever the shortcut
    is.
    
    In the future I'd like to have a way to say "this .desktop file
    is a shortcut, ignore me" or something.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646689

 src/shell-window-tracker.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index 9b24cdc..d2983be 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -429,12 +429,14 @@ get_app_for_window (ShellWindowTracker    *monitor,
         }
     }
 
-  result = get_app_from_window_pid (monitor, window);
+  /* Check if the app's WM_CLASS specifies an app; this is
+   * canonical if it does.
+   */
+  result = get_app_from_window_wmclass (window);
   if (result != NULL)
     return result;
 
-  /* Check if the app's WM_CLASS specifies an app */
-  result = get_app_from_window_wmclass (window);
+  result = get_app_from_window_pid (monitor, window);
   if (result != NULL)
     return result;
 



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