wrap key ungrab like btn ungrab, for it'll be used again
This commit is contained in:
parent
25ca41475e
commit
f22f30d08a
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $OpenBSD: calmwm.h,v 1.222 2013/10/19 19:39:34 okan Exp $
|
||||
* $OpenBSD: calmwm.h,v 1.223 2013/10/20 01:55:32 okan Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CALMWM_H_
|
||||
@ -516,6 +516,7 @@ int xu_getprop(Window, Atom, Atom, long, unsigned char **);
|
||||
int xu_get_wm_state(Window, int *);
|
||||
int xu_getstrprop(Window, Atom, char **);
|
||||
void xu_key_grab(Window, u_int, KeySym);
|
||||
void xu_key_ungrab(Window);
|
||||
void xu_ptr_getpos(Window, int *, int *);
|
||||
int xu_ptr_grab(Window, u_int, Cursor);
|
||||
int xu_ptr_regrab(u_int, Cursor);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $OpenBSD: conf.c,v 1.147 2013/10/19 19:39:34 okan Exp $
|
||||
* $OpenBSD: conf.c,v 1.148 2013/10/20 01:55:32 okan Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -663,7 +663,7 @@ conf_grab_kbd(Window win)
|
||||
{
|
||||
struct keybinding *kb;
|
||||
|
||||
XUngrabKey(X_Dpy, AnyKey, AnyModifier, win);
|
||||
xu_key_ungrab(win);
|
||||
|
||||
TAILQ_FOREACH(kb, &Conf.keybindingq, entry)
|
||||
xu_key_grab(win, kb->modmask, kb->keysym);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $OpenBSD: xutil.c,v 1.76 2013/10/19 19:39:34 okan Exp $
|
||||
* $OpenBSD: xutil.c,v 1.77 2013/10/20 01:55:32 okan Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -102,6 +102,12 @@ xu_key_grab(Window win, u_int mask, KeySym keysym)
|
||||
True, GrabModeAsync, GrabModeAsync);
|
||||
}
|
||||
|
||||
void
|
||||
xu_key_ungrab(Window win)
|
||||
{
|
||||
XUngrabKey(X_Dpy, AnyKey, AnyModifier, win);
|
||||
}
|
||||
|
||||
int
|
||||
xu_getprop(Window win, Atom atm, Atom type, long len, unsigned char **p)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user