diff options
author | sabetts <sabetts> | 2001-02-28 06:39:33 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-02-28 06:39:33 +0000 |
commit | 513a678413180525d1092d1254e9a0984218073d (patch) | |
tree | eff1378fc17a77458689392018a6714cddfcea07 /src/manage.c | |
parent | 396818df3ca1346cb2f89e9a003af58a29b6a9f3 (diff) | |
download | ratpoison-513a678413180525d1092d1254e9a0984218073d.zip |
* manage.h (ungrab_prefix_key): new prototype
(grab_prefix_key): likewise
* manage.c (ungrab_prefix_key): new function
* main.c (main): calls initialize_default_keybindings after
init_window_list.
* data.h (struct rp_action): key is of type KeySym. state is
unsigned int.
* conf.h (KEY_PREFIX): set to XK_t
* actions.h (cmd_escape): new prototype
* actions.c (cmd_escape): new function
* data.h (struct key): move from actions.h
(struct rp_key): rename from struct key. dependant code updated.
(prefix_key): new global variable. code dependant on KEY_PREFIX
and MODIFIER_PREFIX updated to use this.
* actions.c: "maximize" user command calls cmd_maximize
(initialize_default_keybindings): initializes prefix_key.
Added "escape" command.
* manage.c (force_maximize): moved from actions.c
(maximize): likewise
(maximize_normal): likewise
(maximize_transient): likewise
* actions.c (cmd_maximize): New function
* main.c (handler): Prepends error message with "ERROR: ".
Displays error in message bar. Returns 0.
* events.c (destroy_window): sets rp_current_window to NULL when
there are no more mapped windows.
(destroy_window): calls set_current_window and find_window_other
directly instead of cmd_other.
Diffstat (limited to 'src/manage.c')
-rw-r--r-- | src/manage.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/manage.c b/src/manage.c index aaed647..be2613e 100644 --- a/src/manage.c +++ b/src/manage.c @@ -41,15 +41,24 @@ const char *unmanaged_window_list[] = { extern Atom wm_state; -static void +void grab_prefix_key (Window w) { #ifdef HIDE_MOUSE XGrabKey(dpy, AnyKey, AnyModifier, w, True, GrabModeAsync, GrabModeAsync); #else - XGrabKey(dpy, XKeysymToKeycode (dpy, KEY_PREFIX ), MODIFIER_PREFIX, w, True, - GrabModeAsync, GrabModeAsync); + XGrabKey(dpy, XKeysymToKeycode (dpy, prefix_key.sym ), prefix_key.state, + w, True, GrabModeAsync, GrabModeAsync); +#endif +} + +void +ungrab_prefix_key (Window w) +{ +#ifdef HIDE_MOUSE +#else + XUngrabKey(dpy, XKeysymToKeycode (dpy, prefix_key.sym ), prefix_key.state, w); #endif } |