mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
knf
This commit is contained in:
parent
6900cd3612
commit
96cd288a2a
14
calmwm.h
14
calmwm.h
@ -317,7 +317,8 @@ __dead void usage(void);
|
||||
void client_applysizehints(struct client_ctx *);
|
||||
struct client_ctx *client_current(void);
|
||||
void client_cycle(struct screen_ctx *, int);
|
||||
void client_cycle_leave(struct screen_ctx *, struct client_ctx *);
|
||||
void client_cycle_leave(struct screen_ctx *,
|
||||
struct client_ctx *);
|
||||
void client_delete(struct client_ctx *);
|
||||
void client_draw_border(struct client_ctx *);
|
||||
struct client_ctx *client_find(Window);
|
||||
@ -364,8 +365,8 @@ void search_match_client(struct menu_q *, struct menu_q *,
|
||||
char *);
|
||||
void search_match_exec(struct menu_q *, struct menu_q *,
|
||||
char *);
|
||||
void search_match_exec_path(struct menu_q *, struct menu_q *,
|
||||
char *);
|
||||
void search_match_exec_path(struct menu_q *,
|
||||
struct menu_q *, char *);
|
||||
void search_match_path_any(struct menu_q *, struct menu_q *,
|
||||
char *);
|
||||
void search_match_text(struct menu_q *, struct menu_q *,
|
||||
@ -475,6 +476,8 @@ void xu_ptr_setpos(Window, int, int);
|
||||
void xu_ptr_ungrab(void);
|
||||
void xu_sendmsg(Window, Atom, long);
|
||||
void xu_setstate(struct client_ctx *, int);
|
||||
void xu_xorcolor(XRenderColor, XRenderColor,
|
||||
XRenderColor *);
|
||||
|
||||
void xu_ewmh_net_supported(struct screen_ctx *);
|
||||
void xu_ewmh_net_supported_wm_check(struct screen_ctx *);
|
||||
@ -487,12 +490,11 @@ void xu_ewmh_net_wm_number_of_desktops(struct screen_ctx *);
|
||||
void xu_ewmh_net_showing_desktop(struct screen_ctx *);
|
||||
void xu_ewmh_net_virtual_roots(struct screen_ctx *);
|
||||
void xu_ewmh_net_current_desktop(struct screen_ctx *, long);
|
||||
void xu_ewmh_net_desktop_names(struct screen_ctx *, char *, int);
|
||||
void xu_ewmh_net_desktop_names(struct screen_ctx *, char *,
|
||||
int);
|
||||
|
||||
void xu_ewmh_net_wm_desktop(struct client_ctx *);
|
||||
|
||||
void xu_xorcolor(XRenderColor, XRenderColor, XRenderColor *);
|
||||
|
||||
void u_exec(char *);
|
||||
void u_spawn(char *);
|
||||
|
||||
|
2
conf.c
2
conf.c
@ -62,7 +62,7 @@ conf_gap(struct conf *c, struct screen_ctx *sc)
|
||||
void
|
||||
conf_font(struct conf *c, struct screen_ctx *sc)
|
||||
{
|
||||
font_init(sc, c->font, (const char**)c->menucolor);
|
||||
font_init(sc, c->font, (const char **)c->menucolor);
|
||||
}
|
||||
|
||||
static char *menu_color_binds[CWM_COLOR_MENU_MAX] = {
|
||||
|
3
font.c
3
font.c
@ -62,7 +62,8 @@ font_init(struct screen_ctx *sc, const char *name, const char **color)
|
||||
sc->font = XftFontOpenName(X_Dpy, sc->which, name);
|
||||
if (sc->font == NULL)
|
||||
errx(1, "XftFontOpenName");
|
||||
for(i = 0; i < CWM_COLOR_MENU_MAX; i++) {
|
||||
|
||||
for (i = 0; i < CWM_COLOR_MENU_MAX; i++) {
|
||||
if (*color[i] == '\0')
|
||||
break;
|
||||
if (!XftColorAllocName(X_Dpy, DefaultVisual(X_Dpy, sc->which),
|
||||
|
6
menu.c
6
menu.c
@ -473,12 +473,11 @@ menu_draw_entry(struct screen_ctx *sc, struct menu_ctx *mc,
|
||||
TAILQ_FOREACH(mi, resultq, resultentry)
|
||||
if (entry == i++)
|
||||
break;
|
||||
|
||||
if (mi == NULL)
|
||||
return;
|
||||
|
||||
color = active ? CWM_COLOR_MENU_FG : CWM_COLOR_MENU_BG;
|
||||
text = mi->print[0] != '\0' ?
|
||||
mi->print : mi->text;
|
||||
text = mi->print[0] != '\0' ? mi->print : mi->text;
|
||||
XftDrawRect(sc->xftdraw, &sc->xftcolor[color], 0,
|
||||
font_height(sc) * entry, mc->width,
|
||||
font_height(sc) + font_descent(sc));
|
||||
@ -503,6 +502,7 @@ menu_handle_move(XEvent *e, struct menu_ctx *mc, struct screen_ctx *sc,
|
||||
menu_draw_entry(sc, mc, resultq, mc->entry, 1);
|
||||
} else
|
||||
(void)xu_ptr_regrab(MENUGRABMASK, Cursor_default);
|
||||
|
||||
if (mc->hasprompt)
|
||||
menu_draw_entry(sc, mc, resultq, 1, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user