diff options
author | Havoc Pennington <hp@redhat.com> | 2002-10-07 23:14:40 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-10-07 23:14:40 +0000 |
commit | f08337d93928726904c45eabbd337498970b6c99 (patch) | |
tree | c83b2ec7c31dcc91d0571f17d4261440859a8e6e /src/keybindings.c | |
parent | 372dc090fd519944610aecbfb307affc9a709053 (diff) | |
download | metacity-f08337d93928726904c45eabbd337498970b6c99.tar.gz |
Add a modifier key preference for the Alt+click stuff. Can be set to
2002-10-07 Havoc Pennington <hp@redhat.com>
Add a modifier key preference for the Alt+click stuff.
Can be set to "disabled" as well.
* src/run-metacity.sh: load .Xmodmap in the Xnest if it exists
* src/display.c (meta_display_ungrab_window_buttons): ungrab
AnyModifier in case the modifier changed since we grabbed
(meta_display_open): rearrange code to use meta_display_close() to
mop up when we can't find any screens, avoiding the need to
keep the bail-out code in sync with meta_display_close.
* src/keybindings.c (devirtualize_modifiers): move this function
to a public place in display.c
* src/metacity.schemas.in: add setting for the modifier key
to use for Alt+left/middle/right click.
* src/prefs.c (update_binding): add a missing newline to a warning
(meta_prefs_get_mouse_button_mods): new function
* src/ui.c (meta_ui_parse_modifier): new function
Diffstat (limited to 'src/keybindings.c')
-rw-r--r-- | src/keybindings.c | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/src/keybindings.c b/src/keybindings.c index 0f26cdf8..3fee1396 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -440,35 +440,6 @@ reload_keycodes (MetaDisplay *display) } static void -devirtualize_modifiers (MetaDisplay *display, - MetaVirtualModifier modifiers, - unsigned int *mask) -{ - *mask = 0; - - if (modifiers & META_VIRTUAL_SHIFT_MASK) - *mask |= ShiftMask; - if (modifiers & META_VIRTUAL_CONTROL_MASK) - *mask |= ControlMask; - if (modifiers & META_VIRTUAL_ALT_MASK) - *mask |= Mod1Mask; - if (modifiers & META_VIRTUAL_META_MASK) - *mask |= display->meta_mask; - if (modifiers & META_VIRTUAL_HYPER_MASK) - *mask |= display->hyper_mask; - if (modifiers & META_VIRTUAL_SUPER_MASK) - *mask |= display->super_mask; - if (modifiers & META_VIRTUAL_MOD2_MASK) - *mask |= Mod2Mask; - if (modifiers & META_VIRTUAL_MOD3_MASK) - *mask |= Mod3Mask; - if (modifiers & META_VIRTUAL_MOD4_MASK) - *mask |= Mod4Mask; - if (modifiers & META_VIRTUAL_MOD5_MASK) - *mask |= Mod5Mask; -} - -static void reload_modifiers (MetaDisplay *display) { meta_topic (META_DEBUG_KEYBINDINGS, @@ -481,9 +452,9 @@ reload_modifiers (MetaDisplay *display) i = 0; while (display->screen_bindings[i].keysym != None) { - devirtualize_modifiers (display, - display->screen_bindings[i].modifiers, - &display->screen_bindings[i].mask); + meta_display_devirtualize_modifiers (display, + display->screen_bindings[i].modifiers, + &display->screen_bindings[i].mask); ++i; } @@ -496,9 +467,9 @@ reload_modifiers (MetaDisplay *display) i = 0; while (display->window_bindings[i].keysym != None) { - devirtualize_modifiers (display, - display->window_bindings[i].modifiers, - &display->window_bindings[i].mask); + meta_display_devirtualize_modifiers (display, + display->window_bindings[i].modifiers, + &display->window_bindings[i].mask); ++i; } |