mirror of
https://github.com/0intro/wmii
synced 2024-11-21 21:31:33 +03:00
fix warnings
This change fixes the following warnings: lib/libstuff/x11/keys/parsekey.c:73:2: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations] cmd/strut/ewmh.c:23:27: warning: ‘sizeof’ on array function parameter ‘struts’ will return size of ‘Rectangle *’ {aka ‘struct Rectangle *’} [-Wsizeof-array-argument] cmd/wmii/key.c:109:3: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations] cmd/wmii/dat.h:108:7: warning: comparison of constant ‘2’ with boolean expression is always false [-Wbool-compare]
This commit is contained in:
parent
489c9e47f4
commit
d1acb57db2
@ -20,7 +20,7 @@ ewmh_getstrut(Window *w, Rectangle struts[4]) {
|
||||
long *strut;
|
||||
ulong n;
|
||||
|
||||
memset(struts, 0, sizeof struts);
|
||||
memset(struts, 0, sizeof *struts);
|
||||
|
||||
n = getprop_long(w, Net("WM_STRUT_PARTIAL"), "CARDINAL",
|
||||
0L, &strut, Last);
|
||||
|
@ -201,7 +201,7 @@ struct Client {
|
||||
bool noinput;
|
||||
bool rgba;
|
||||
bool titleless;
|
||||
bool urgent;
|
||||
int urgent;
|
||||
};
|
||||
|
||||
struct Divide {
|
||||
@ -296,7 +296,7 @@ struct View {
|
||||
int selcol;
|
||||
int selscreen;
|
||||
bool dead;
|
||||
bool urgent;
|
||||
int urgent;
|
||||
Rectangle *r;
|
||||
Rectangle *pad;
|
||||
};
|
||||
|
@ -106,7 +106,7 @@ next_keystroke(ulong *mod, KeyCode *code) {
|
||||
XMaskEvent(display, KeyPressMask, &e);
|
||||
*mod |= e.xkey.state & valid_mask;
|
||||
*code = (KeyCode)e.xkey.keycode;
|
||||
sym = XKeycodeToKeysym(display, e.xkey.keycode, 0);
|
||||
sym = XkbKeycodeToKeysym(display, e.xkey.keycode, 0, 0);
|
||||
} while(IsModifierKey(sym));
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#define Mask XMask
|
||||
#include <stuff/geom.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#ifdef _X11_VISIBLE
|
||||
|
@ -70,7 +70,7 @@ fmtkey(Fmt *f) {
|
||||
int nfmt;
|
||||
|
||||
ev = va_arg(f->args, XKeyEvent*);
|
||||
key = XKeysymToString(XKeycodeToKeysym(display, ev->keycode, 0));
|
||||
key = XKeysymToString(XkbKeycodeToKeysym(display, ev->keycode, 0, 0));
|
||||
|
||||
nfmt = f->nfmt;
|
||||
unmask(f, ev->state, modkey_names, '-');
|
||||
|
Loading…
Reference in New Issue
Block a user