mirror of
https://github.com/0intro/wmii
synced 2024-11-25 07:09:38 +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;
|
long *strut;
|
||||||
ulong n;
|
ulong n;
|
||||||
|
|
||||||
memset(struts, 0, sizeof struts);
|
memset(struts, 0, sizeof *struts);
|
||||||
|
|
||||||
n = getprop_long(w, Net("WM_STRUT_PARTIAL"), "CARDINAL",
|
n = getprop_long(w, Net("WM_STRUT_PARTIAL"), "CARDINAL",
|
||||||
0L, &strut, Last);
|
0L, &strut, Last);
|
||||||
|
@ -201,7 +201,7 @@ struct Client {
|
|||||||
bool noinput;
|
bool noinput;
|
||||||
bool rgba;
|
bool rgba;
|
||||||
bool titleless;
|
bool titleless;
|
||||||
bool urgent;
|
int urgent;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Divide {
|
struct Divide {
|
||||||
@ -296,7 +296,7 @@ struct View {
|
|||||||
int selcol;
|
int selcol;
|
||||||
int selscreen;
|
int selscreen;
|
||||||
bool dead;
|
bool dead;
|
||||||
bool urgent;
|
int urgent;
|
||||||
Rectangle *r;
|
Rectangle *r;
|
||||||
Rectangle *pad;
|
Rectangle *pad;
|
||||||
};
|
};
|
||||||
|
@ -106,7 +106,7 @@ next_keystroke(ulong *mod, KeyCode *code) {
|
|||||||
XMaskEvent(display, KeyPressMask, &e);
|
XMaskEvent(display, KeyPressMask, &e);
|
||||||
*mod |= e.xkey.state & valid_mask;
|
*mod |= e.xkey.state & valid_mask;
|
||||||
*code = (KeyCode)e.xkey.keycode;
|
*code = (KeyCode)e.xkey.keycode;
|
||||||
sym = XKeycodeToKeysym(display, e.xkey.keycode, 0);
|
sym = XkbKeycodeToKeysym(display, e.xkey.keycode, 0, 0);
|
||||||
} while(IsModifierKey(sym));
|
} while(IsModifierKey(sym));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#define Mask XMask
|
#define Mask XMask
|
||||||
#include <stuff/geom.h>
|
#include <stuff/geom.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/XKBlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/extensions/Xrender.h>
|
#include <X11/extensions/Xrender.h>
|
||||||
#ifdef _X11_VISIBLE
|
#ifdef _X11_VISIBLE
|
||||||
|
@ -70,7 +70,7 @@ fmtkey(Fmt *f) {
|
|||||||
int nfmt;
|
int nfmt;
|
||||||
|
|
||||||
ev = va_arg(f->args, XKeyEvent*);
|
ev = va_arg(f->args, XKeyEvent*);
|
||||||
key = XKeysymToString(XKeycodeToKeysym(display, ev->keycode, 0));
|
key = XKeysymToString(XkbKeycodeToKeysym(display, ev->keycode, 0, 0));
|
||||||
|
|
||||||
nfmt = f->nfmt;
|
nfmt = f->nfmt;
|
||||||
unmask(f, ev->state, modkey_names, '-');
|
unmask(f, ev->state, modkey_names, '-');
|
||||||
|
Loading…
Reference in New Issue
Block a user