summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2012-05-16 01:04:37 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2012-05-16 01:04:37 +0000
commit802381203f7aae4457dc912781b8c3aceed69bac (patch)
tree75ec4877c9a3d4e5c114cf8584db229a01f8be3b /app
parent02cf4038d22a75dd5e33cfd73c782a3f674494c8 (diff)
convert from deprecated XKeycodeToKeysym to XkbKeycodeToKeysym
ok sthen@
Diffstat (limited to 'app')
-rw-r--r--app/cwm/calmwm.h3
-rw-r--r--app/cwm/menu.c4
-rw-r--r--app/cwm/xevents.c8
-rw-r--r--app/cwm/xutil.c10
4 files changed, 13 insertions, 12 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index 06df73b14..f36694f2c 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -15,12 +15,13 @@
* 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.143 2012/05/13 15:17:13 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.144 2012/05/16 01:04:36 okan Exp $
*/
#ifndef _CALMWM_H_
#define _CALMWM_H_
+#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/Xft/Xft.h>
#include <X11/Xlib.h>
diff --git a/app/cwm/menu.c b/app/cwm/menu.c
index 79b283d73..5fc2888a9 100644
--- a/app/cwm/menu.c
+++ b/app/cwm/menu.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: menu.c,v 1.33 2011/09/08 12:00:50 okan Exp $
+ * $OpenBSD: menu.c,v 1.34 2012/05/16 01:04:36 okan Exp $
*/
#include <sys/param.h>
@@ -466,7 +466,7 @@ menu_keycode(KeyCode kc, u_int state, enum ctltype *ctl, char *chr)
*ctl = CTL_NONE;
*chr = '\0';
- ks = XKeycodeToKeysym(X_Dpy, kc, (state & ShiftMask) ? 1 : 0);
+ ks = XkbKeycodeToKeysym(X_Dpy, kc, 0, (state & ShiftMask) ? 1 : 0);
/* Look for control characters. */
switch (ks) {
diff --git a/app/cwm/xevents.c b/app/cwm/xevents.c
index c0d46fc5c..23cb4a60b 100644
--- a/app/cwm/xevents.c
+++ b/app/cwm/xevents.c
@@ -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: xevents.c,v 1.57 2012/05/13 15:17:13 okan Exp $
+ * $OpenBSD: xevents.c,v 1.58 2012/05/16 01:04:36 okan Exp $
*/
/*
@@ -278,8 +278,8 @@ xev_handle_keypress(XEvent *ee)
KeySym keysym, skeysym;
int modshift;
- keysym = XKeycodeToKeysym(X_Dpy, e->keycode, 0);
- skeysym = XKeycodeToKeysym(X_Dpy, e->keycode, 1);
+ keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
+ skeysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 1);
/* we don't care about caps lock and numlock here */
e->state &= ~(LockMask | Mod2Mask);
@@ -327,7 +327,7 @@ xev_handle_keyrelease(XEvent *ee)
sc = screen_fromroot(e->root);
cc = client_current();
- keysym = XKeycodeToKeysym(X_Dpy, e->keycode, 0);
+ keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
if (keysym != XK_Alt_L && keysym != XK_Alt_R)
return;
diff --git a/app/cwm/xutil.c b/app/cwm/xutil.c
index 8b0704c91..bcd85fbfc 100644
--- a/app/cwm/xutil.c
+++ b/app/cwm/xutil.c
@@ -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.38 2012/05/13 15:15:54 okan Exp $
+ * $OpenBSD: xutil.c,v 1.39 2012/05/16 01:04:36 okan Exp $
*/
#include <sys/param.h>
@@ -94,8 +94,8 @@ xu_key_grab(Window win, int mask, int keysym)
int i;
code = XKeysymToKeycode(X_Dpy, keysym);
- if ((XKeycodeToKeysym(X_Dpy, code, 0) != keysym) &&
- (XKeycodeToKeysym(X_Dpy, code, 1) == keysym))
+ if ((XkbKeycodeToKeysym(X_Dpy, code, 0, 0) != keysym) &&
+ (XkbKeycodeToKeysym(X_Dpy, code, 0, 1) == keysym))
mask |= ShiftMask;
for (i = 0; i < nitems(ign_mods); i++)
@@ -110,8 +110,8 @@ xu_key_ungrab(Window win, int mask, int keysym)
int i;
code = XKeysymToKeycode(X_Dpy, keysym);
- if ((XKeycodeToKeysym(X_Dpy, code, 0) != keysym) &&
- (XKeycodeToKeysym(X_Dpy, code, 1) == keysym))
+ if ((XkbKeycodeToKeysym(X_Dpy, code, 0, 0) != keysym) &&
+ (XkbKeycodeToKeysym(X_Dpy, code, 0, 1) == keysym))
mask |= ShiftMask;
for (i = 0; i < nitems(ign_mods); i++)