metacity r3785 - in trunk: . src/core



Author: tthurman
Date: Sun Jul 13 03:26:39 2008
New Revision: 3785
URL: http://svn.gnome.org/viewvc/metacity?rev=3785&view=rev

Log:
2008-07-12  Thomas Thurman  <tthurman gnome org>

        * src/core/group.c (meta_window_get_group): This function can now
        officially return NULL.
        * src/core/window.c (meta_window_same_application): Two windows can't
        belong to the same application unless they both belong to some
        application.  (Both belonging to no application is not the same.)
        
        Closes #453022.


Modified:
   trunk/   (props changed)
   trunk/ChangeLog
   trunk/src/core/group.c
   trunk/src/core/window.c

Modified: trunk/src/core/group.c
==============================================================================
--- trunk/src/core/group.c	(original)
+++ trunk/src/core/group.c	Sun Jul 13 03:26:39 2008
@@ -109,8 +109,6 @@
   if (window->unmanaging)
     return NULL;
 
-  g_assert (window->group != NULL);
-
   return window->group;
 }
 

Modified: trunk/src/core/window.c
==============================================================================
--- trunk/src/core/window.c	(original)
+++ trunk/src/core/window.c	Sun Jul 13 03:26:39 2008
@@ -7556,9 +7556,13 @@
 meta_window_same_application (MetaWindow *window,
                               MetaWindow *other_window)
 {
+  MetaGroup *group       = meta_window_get_group (window);
+  MetaGroup *other_group = meta_window_get_group (other_window);
+
   return
-    meta_window_get_group (window) ==
-    meta_window_get_group (other_window);
+    group!=NULL &&
+    other_group!=NULL &&
+    group==other_group;
 }
 
 void



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