summaryrefslogtreecommitdiff
path: root/src/core/group.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/group.c')
-rw-r--r--src/core/group.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/core/group.c b/src/core/group.c
index aed11b5b..66aee174 100644
--- a/src/core/group.c
+++ b/src/core/group.c
@@ -2,10 +2,10 @@
/* Metacity window groups */
-/*
+/*
* Copyright (C) 2002 Red Hat Inc.
* Copyright (C) 2003 Rob Adams
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -15,7 +15,7 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -34,16 +34,16 @@ meta_group_new (MetaDisplay *display,
#define N_INITIAL_PROPS 3
Atom initial_props[N_INITIAL_PROPS];
int i;
-
+
g_assert (N_INITIAL_PROPS == (int) G_N_ELEMENTS (initial_props));
-
+
group = g_new0 (MetaGroup, 1);
group->display = display;
group->windows = NULL;
group->group_leader = group_leader;
group->refcount = 1; /* owned by caller, hash table has only weak ref */
-
+
if (display->groups_by_leader == NULL)
display->groups_by_leader = g_hash_table_new (meta_unsigned_long_hash,
meta_unsigned_long_equal);
@@ -60,13 +60,13 @@ meta_group_new (MetaDisplay *display,
initial_props[i++] = display->atom__NET_WM_PID;
initial_props[i++] = display->atom__NET_STARTUP_ID;
g_assert (N_INITIAL_PROPS == i);
-
+
meta_group_reload_properties (group, initial_props, N_INITIAL_PROPS);
meta_topic (META_DEBUG_GROUPS,
"Created new group with leader 0x%lx\n",
group->group_leader);
-
+
return group;
}
@@ -80,10 +80,10 @@ meta_group_unref (MetaGroup *group)
{
meta_topic (META_DEBUG_GROUPS,
"Destroying group with leader 0x%lx\n",
- group->group_leader);
-
+ group->group_leader);
+
g_assert (group->display->groups_by_leader != NULL);
-
+
g_hash_table_remove (group->display->groups_by_leader,
&group->group_leader);
@@ -96,7 +96,7 @@ meta_group_unref (MetaGroup *group)
g_free (group->wm_client_machine);
g_free (group->startup_id);
-
+
g_free (group);
}
}
@@ -117,9 +117,9 @@ meta_window_compute_group (MetaWindow* window)
MetaWindow *ancestor;
/* use window->xwindow if no window->xgroup_leader */
-
+
group = NULL;
-
+
/* Determine the ancestor of the window; its group setting will override the
* normal grouping rules; see bug 328211.
*/
@@ -136,7 +136,7 @@ meta_window_compute_group (MetaWindow* window)
group = g_hash_table_lookup (window->display->groups_by_leader,
&window->xwindow);
}
-
+
if (group != NULL)
{
window->group = group;
@@ -153,7 +153,7 @@ meta_window_compute_group (MetaWindow* window)
else
group = meta_group_new (window->display,
window->xwindow);
-
+
window->group = group;
}
@@ -173,7 +173,7 @@ remove_window_from_group (MetaWindow *window)
meta_topic (META_DEBUG_GROUPS,
"Removing %s from group with leader 0x%lx\n",
window->desc, window->group->group_leader);
-
+
window->group->windows =
g_slist_remove (window->group->windows,
window);
@@ -200,9 +200,9 @@ meta_display_lookup_group (MetaDisplay *display,
Window group_leader)
{
MetaGroup *group;
-
+
group = NULL;
-
+
if (display->groups_by_leader)
group = g_hash_table_lookup (display->groups_by_leader,
&group_leader);
@@ -221,7 +221,7 @@ meta_group_update_layers (MetaGroup *group)
{
GSList *tmp;
GSList *frozen_stacks;
-
+
if (group->windows == NULL)
return;
@@ -240,7 +240,7 @@ meta_group_update_layers (MetaGroup *group)
meta_stack_update_layer (window->screen->stack,
window);
-
+
tmp = tmp->next;
}