mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
Code cleanup
2004-10-13 Elijah Newren <newren@math.utah.edu> Code cleanup * src/window.c (is_in_dock_group, docks_at_end_cmp, shuffle_docks_to_end): removed functions, (meta_window_notify_focus): no need to call is_in_dock_group or shuffle_docks_to_end because of the patch from #120100 that was committed.
This commit is contained in:
parent
b03558dc4d
commit
05388194fc
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2004-10-13 Elijah Newren <newren@math.utah.edu>
|
||||||
|
|
||||||
|
Code cleanup
|
||||||
|
|
||||||
|
* src/window.c (is_in_dock_group, docks_at_end_cmp,
|
||||||
|
shuffle_docks_to_end): removed functions,
|
||||||
|
(meta_window_notify_focus): no need to call is_in_dock_group or
|
||||||
|
shuffle_docks_to_end because of the patch from #120100 that was
|
||||||
|
committed.
|
||||||
|
|
||||||
2004-10-13 Vincent Untz <vincent@vuntz.net>
|
2004-10-13 Vincent Untz <vincent@vuntz.net>
|
||||||
|
|
||||||
Add a keybinding to launch a terminal
|
Add a keybinding to launch a terminal
|
||||||
|
68
src/window.c
68
src/window.c
@ -4164,72 +4164,6 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_in_dock_group (MetaWindow *window)
|
|
||||||
{
|
|
||||||
MetaGroup *group;
|
|
||||||
GSList *list;
|
|
||||||
GSList *tmp;
|
|
||||||
|
|
||||||
if (META_WINDOW_IN_DOCK_TAB_CHAIN (window))
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
if (window->type == META_WINDOW_NORMAL)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* If a transient-type window is in dock group,
|
|
||||||
* return TRUE
|
|
||||||
*/
|
|
||||||
group = meta_window_get_group (window);
|
|
||||||
list = meta_group_list_windows (group);
|
|
||||||
tmp = list;
|
|
||||||
while (tmp != NULL)
|
|
||||||
{
|
|
||||||
MetaWindow *gw = tmp->data;
|
|
||||||
|
|
||||||
if (META_WINDOW_IN_DOCK_TAB_CHAIN (gw))
|
|
||||||
{
|
|
||||||
g_slist_free (list);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp = tmp->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_slist_free (list);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
docks_at_end_cmp (const void *a,
|
|
||||||
const void *b)
|
|
||||||
{
|
|
||||||
MetaWindow *window_a = (MetaWindow*) a;
|
|
||||||
MetaWindow *window_b = (MetaWindow*) b;
|
|
||||||
|
|
||||||
if (META_WINDOW_IN_DOCK_TAB_CHAIN (window_a))
|
|
||||||
{
|
|
||||||
if (META_WINDOW_IN_DOCK_TAB_CHAIN (window_b))
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return 1; /* a > b since a is a dock */
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (META_WINDOW_IN_DOCK_TAB_CHAIN (window_b))
|
|
||||||
return -1; /* b > a since b is a dock */
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
shuffle_docks_to_end (GList **mru_list_p)
|
|
||||||
{
|
|
||||||
*mru_list_p = g_list_sort (*mru_list_p,
|
|
||||||
docks_at_end_cmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_window_notify_focus (MetaWindow *window,
|
meta_window_notify_focus (MetaWindow *window,
|
||||||
XEvent *event)
|
XEvent *event)
|
||||||
@ -4335,8 +4269,6 @@ meta_window_notify_focus (MetaWindow *window,
|
|||||||
window->screen->active_workspace->mru_list =
|
window->screen->active_workspace->mru_list =
|
||||||
g_list_prepend (window->screen->active_workspace->mru_list,
|
g_list_prepend (window->screen->active_workspace->mru_list,
|
||||||
window);
|
window);
|
||||||
if (!is_in_dock_group (window))
|
|
||||||
shuffle_docks_to_end (&window->screen->active_workspace->mru_list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
|
Loading…
Reference in New Issue
Block a user