summaryrefslogtreecommitdiff
path: root/src/prefs.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-06-09 04:04:19 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-06-09 04:04:19 +0000
commitb168954ed30d7232f442efe5d6c364fc832c7cb9 (patch)
tree49e786da9b4e09ba624131cb39c1b54db7ba5c5e /src/prefs.c
parentfb5a3a89989276bba163e33fb37a10c761ee9444 (diff)
downloadmetacity-b168954ed30d7232f442efe5d6c364fc832c7cb9.tar.gz
metacity-b168954ed30d7232f442efe5d6c364fc832c7cb9.tar.bz2
Cleanups to workspace popup patch. Space before all parens in a couple
2002-06-08 Havoc Pennington <hp@pobox.com> Cleanups to workspace popup patch. Space before all parens in a couple places. * src/prefs.c (meta_prefs_get_keybinding_action): fix brace indentation, and use while instead of for loop. Take a "mask" argument to avoid ambiguity issues. * src/keybindings.c (handle_workspace_switch): rename from handle_workspace_forward since there's no directionality here (handle_workspace_switch): add a FIXME about how screwed it is that we need a window in order to do our grab. Should be able to grab on a dummy window like no_focus_window or the root window. (process_workspace_switch_grab): rename from tab_grab for clarity, no tab involved here. * src/common.h (enum): have only one grab op for all workspace switching directions, instead of one for each.
Diffstat (limited to 'src/prefs.c')
-rw-r--r--src/prefs.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/prefs.c b/src/prefs.c
index af5f66f..fdbc794 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -1033,17 +1033,21 @@ meta_prefs_get_auto_raise_delay ()
}
MetaKeyBindingAction
-meta_prefs_get_keybinding_action (unsigned int keysym)
+meta_prefs_get_keybinding_action (unsigned int keysym,
+ unsigned long mask)
{
int i;
- for (i = (int) G_N_ELEMENTS (screen_bindings) - 1; i >= 0; --i)
+ i = G_N_ELEMENTS (screen_bindings) - 1;
+ while (i >= 0)
{
- if (screen_bindings[i].keysym == keysym)
- {
+ if (screen_bindings[i].keysym == keysym &&
+ screen_bindings[i].mask == mask)
return (MetaKeyBindingAction) i;
- }
+
+ --i;
}
+
return META_KEYBINDING_ACTION_NONE;
}