summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Thurman <tthurman@gnome.org>2008-07-13 03:26:39 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2008-07-13 03:26:39 +0000
commit6bf62be4d002ec6a623b2c6c00e795c4695664e1 (patch)
tree70a40a87e94a559b15018fbe8c07138b7418ce58
parent77820c9697097f9cdb4be0422db72fb9d86070b4 (diff)
downloadmetacity-6bf62be4d002ec6a623b2c6c00e795c4695664e1.tar.gz
This function can now officially return NULL. Two windows can't belong to
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. svn path=/trunk/; revision=3785
-rw-r--r--ChangeLog10
-rw-r--r--src/core/group.c2
-rw-r--r--src/core/window.c8
3 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c7d68dd8..e26ec053 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
-2008-06-30 Thomas Thurman <tthurman@gnome.org
+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.)
+
+2008-06-30 Thomas Thurman <tthurman@gnome.org>
* src/core/bell.c (meta_bell_set_audible): Fix typo that
slipped through.
diff --git a/src/core/group.c b/src/core/group.c
index 5b327407..69c879ee 100644
--- a/src/core/group.c
+++ b/src/core/group.c
@@ -109,8 +109,6 @@ meta_window_get_group (MetaWindow *window)
if (window->unmanaging)
return NULL;
- g_assert (window->group != NULL);
-
return window->group;
}
diff --git a/src/core/window.c b/src/core/window.c
index b2e7300f..a528e16b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7556,9 +7556,13 @@ gboolean
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