diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-04 01:10:03 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-04 01:10:03 +0000 |
| commit | 7e946f68d9f8ec7c880664b437edbbaa5d49ac10 (patch) | |
| tree | df9979455e26627815642071bd4bc43bcc721db8 /openbox/grab.c | |
| parent | 5784f11132cb2ee64af23695867aca9f4ebe0b9b (diff) | |
make the modifier key code a lot better...
1) it can handle more user cases.
2) it can handle binding more modifier keys with their keysym names like Hyper and Super. W is a shortcut for Super, cuz the windows key is generally bound to it.
3) if you change your keymap bindings and reconfigure openbox it will learn your changes.
and i dunno.. its just nice and stuff now.. you can actually read it I think..
Diffstat (limited to 'openbox/grab.c')
| -rw-r--r-- | openbox/grab.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/openbox/grab.c b/openbox/grab.c index eaf65f6b..3e1066ba 100644 --- a/openbox/grab.c +++ b/openbox/grab.c @@ -18,6 +18,7 @@ */ #include "grab.h" +#include "modkeys.h" #include "openbox.h" #include "event.h" #include "xerror.h" @@ -135,17 +136,20 @@ gint grab_server(gboolean grab) void grab_startup(gboolean reconfig) { guint i = 0; + guint num, caps, scroll; - if (reconfig) return; + num = modkeys_key_to_mask(OB_MODKEY_KEY_NUMLOCK); + caps = modkeys_key_to_mask(OB_MODKEY_KEY_CAPSLOCK); + scroll = modkeys_key_to_mask(OB_MODKEY_KEY_SCROLLLOCK); mask_list[i++] = 0; - mask_list[i++] = LockMask; - mask_list[i++] = NumLockMask; - mask_list[i++] = LockMask | NumLockMask; - mask_list[i++] = ScrollLockMask; - mask_list[i++] = ScrollLockMask | LockMask; - mask_list[i++] = ScrollLockMask | NumLockMask; - mask_list[i++] = ScrollLockMask | LockMask | NumLockMask; + mask_list[i++] = num; + mask_list[i++] = caps; + mask_list[i++] = scroll; + mask_list[i++] = num | caps; + mask_list[i++] = num | scroll; + mask_list[i++] = caps | scroll; + mask_list[i++] = num | caps | scroll; g_assert(i == MASK_LIST_SIZE); } |
