mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
keybindings: Simplify a bit more code
This commit is contained in:
parent
ef363e9d2e
commit
31081e5dac
@ -731,20 +731,15 @@ rebuild_special_bindings (MetaDisplay *display)
|
|||||||
static void
|
static void
|
||||||
ungrab_key_bindings (MetaDisplay *display)
|
ungrab_key_bindings (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
GSList *tmp;
|
GSList *windows, *l;
|
||||||
GSList *windows;
|
|
||||||
|
|
||||||
meta_screen_ungrab_keys (display->screen);
|
meta_screen_ungrab_keys (display->screen);
|
||||||
|
|
||||||
windows = meta_display_list_windows (display, META_LIST_DEFAULT);
|
windows = meta_display_list_windows (display, META_LIST_DEFAULT);
|
||||||
tmp = windows;
|
for (l = windows; l; l = l->next)
|
||||||
while (tmp != NULL)
|
|
||||||
{
|
{
|
||||||
MetaWindow *w = tmp->data;
|
MetaWindow *w = l->data;
|
||||||
|
|
||||||
meta_window_ungrab_keys (w);
|
meta_window_ungrab_keys (w);
|
||||||
|
|
||||||
tmp = tmp->next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slist_free (windows);
|
g_slist_free (windows);
|
||||||
@ -753,20 +748,15 @@ ungrab_key_bindings (MetaDisplay *display)
|
|||||||
static void
|
static void
|
||||||
grab_key_bindings (MetaDisplay *display)
|
grab_key_bindings (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
GSList *tmp;
|
GSList *windows, *l;
|
||||||
GSList *windows;
|
|
||||||
|
|
||||||
meta_screen_grab_keys (display->screen);
|
meta_screen_grab_keys (display->screen);
|
||||||
|
|
||||||
windows = meta_display_list_windows (display, META_LIST_DEFAULT);
|
windows = meta_display_list_windows (display, META_LIST_DEFAULT);
|
||||||
tmp = windows;
|
for (l = windows; l; l = l->next)
|
||||||
while (tmp != NULL)
|
|
||||||
{
|
{
|
||||||
MetaWindow *w = tmp->data;
|
MetaWindow *w = l->data;
|
||||||
|
|
||||||
meta_window_grab_keys (w);
|
meta_window_grab_keys (w);
|
||||||
|
|
||||||
tmp = tmp->next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slist_free (windows);
|
g_slist_free (windows);
|
||||||
|
Loading…
Reference in New Issue
Block a user