mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
cvsimport
This commit is contained in:
commit
f3477539bb
2
calmwm.h
2
calmwm.h
@ -524,7 +524,7 @@ void xev_loop(void);
|
|||||||
|
|
||||||
void xu_btn_grab(Window, int, u_int);
|
void xu_btn_grab(Window, int, u_int);
|
||||||
void xu_btn_ungrab(Window, int, u_int);
|
void xu_btn_ungrab(Window, int, u_int);
|
||||||
int xu_getprop(Window, Atom, Atom, long, u_char **);
|
int xu_getprop(Window, Atom, Atom, long, unsigned char **);
|
||||||
int xu_get_wm_state(Window, int *);
|
int xu_get_wm_state(Window, int *);
|
||||||
int xu_getstrprop(Window, Atom, char **);
|
int xu_getstrprop(Window, Atom, char **);
|
||||||
void xu_key_grab(Window, u_int, KeySym);
|
void xu_key_grab(Window, u_int, KeySym);
|
||||||
|
2
client.c
2
client.c
@ -841,7 +841,7 @@ client_getmwmhints(struct client_ctx *cc)
|
|||||||
struct mwm_hints *mwmh;
|
struct mwm_hints *mwmh;
|
||||||
|
|
||||||
if (xu_getprop(cc->win, cwmh[_MOTIF_WM_HINTS], cwmh[_MOTIF_WM_HINTS],
|
if (xu_getprop(cc->win, cwmh[_MOTIF_WM_HINTS], cwmh[_MOTIF_WM_HINTS],
|
||||||
PROP_MWM_HINTS_ELEMENTS, (u_char **)&mwmh) == MWM_NUMHINTS)
|
PROP_MWM_HINTS_ELEMENTS, (unsigned char **)&mwmh) == MWM_NUMHINTS)
|
||||||
if (mwmh->flags & MWM_HINTS_DECORATIONS &&
|
if (mwmh->flags & MWM_HINTS_DECORATIONS &&
|
||||||
!(mwmh->decorations & MWM_DECOR_ALL) &&
|
!(mwmh->decorations & MWM_DECOR_ALL) &&
|
||||||
!(mwmh->decorations & MWM_DECOR_BORDER))
|
!(mwmh->decorations & MWM_DECOR_BORDER))
|
||||||
|
3
conf.c
3
conf.c
@ -104,9 +104,12 @@ conf_screen(struct screen_ctx *sc)
|
|||||||
|
|
||||||
sc->gap = Conf.gap;
|
sc->gap = Conf.gap;
|
||||||
|
|
||||||
|
sc->xftfont = XftFontOpenXlfd(X_Dpy, sc->which, Conf.font);
|
||||||
|
if (sc->xftfont == NULL) {
|
||||||
sc->xftfont = XftFontOpenName(X_Dpy, sc->which, Conf.font);
|
sc->xftfont = XftFontOpenName(X_Dpy, sc->which, Conf.font);
|
||||||
if (sc->xftfont == NULL)
|
if (sc->xftfont == NULL)
|
||||||
errx(1, "XftFontOpenName");
|
errx(1, "XftFontOpenName");
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < nitems(color_binds); i++) {
|
for (i = 0; i < nitems(color_binds); i++) {
|
||||||
if (i == CWM_COLOR_MENU_FONT_SEL && *Conf.color[i] == '\0') {
|
if (i == CWM_COLOR_MENU_FONT_SEL && *Conf.color[i] == '\0') {
|
||||||
|
2
group.c
2
group.c
@ -419,7 +419,7 @@ group_update_names(struct screen_ctx *sc)
|
|||||||
int i = 0, j = 0, nstrings = 0, n = 0, setnames = 0;
|
int i = 0, j = 0, nstrings = 0, n = 0, setnames = 0;
|
||||||
|
|
||||||
if ((j = xu_getprop(sc->rootwin, ewmh[_NET_DESKTOP_NAMES],
|
if ((j = xu_getprop(sc->rootwin, ewmh[_NET_DESKTOP_NAMES],
|
||||||
cwmh[UTF8_STRING], 0xffffff, (u_char **)&prop_ret)) > 0) {
|
cwmh[UTF8_STRING], 0xffffff, (unsigned char **)&prop_ret)) > 0) {
|
||||||
prop_ret[j - 1] = '\0'; /* paranoia */
|
prop_ret[j - 1] = '\0'; /* paranoia */
|
||||||
while (i < j) {
|
while (i < j) {
|
||||||
if (prop_ret[i++] == '\0')
|
if (prop_ret[i++] == '\0')
|
||||||
|
6
xutil.c
6
xutil.c
@ -106,7 +106,7 @@ xu_key_grab(Window win, u_int mask, KeySym keysym)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
xu_getprop(Window win, Atom atm, Atom type, long len, u_char **p)
|
xu_getprop(Window win, Atom atm, Atom type, long len, unsigned char **p)
|
||||||
{
|
{
|
||||||
Atom realtype;
|
Atom realtype;
|
||||||
u_long n, extra;
|
u_long n, extra;
|
||||||
@ -160,7 +160,7 @@ xu_get_wm_state(Window win, int *state)
|
|||||||
long *p = NULL;
|
long *p = NULL;
|
||||||
|
|
||||||
if (xu_getprop(win, cwmh[WM_STATE], cwmh[WM_STATE], 2L,
|
if (xu_getprop(win, cwmh[WM_STATE], cwmh[WM_STATE], 2L,
|
||||||
(u_char **)&p) <= 0)
|
(unsigned char **)&p) <= 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
*state = (int)*p;
|
*state = (int)*p;
|
||||||
@ -331,7 +331,7 @@ xu_ewmh_get_net_wm_state(struct client_ctx *cc, int *n)
|
|||||||
Atom *state, *p = NULL;
|
Atom *state, *p = NULL;
|
||||||
|
|
||||||
if ((*n = xu_getprop(cc->win, ewmh[_NET_WM_STATE], XA_ATOM, 64L,
|
if ((*n = xu_getprop(cc->win, ewmh[_NET_WM_STATE], XA_ATOM, 64L,
|
||||||
(u_char **)&p)) <= 0)
|
(unsigned char **)&p)) <= 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
state = xcalloc(*n, sizeof(Atom));
|
state = xcalloc(*n, sizeof(Atom));
|
||||||
|
Loading…
Reference in New Issue
Block a user