mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Instead of having a function that just calls TAILQ_INIT on a global, use
TAILQ_HEAD_INITIALIZER() and drop the function. ok okan@
This commit is contained in:
parent
e7f0d63413
commit
09d88f4a18
6
calmwm.c
6
calmwm.c
@ -29,10 +29,10 @@ Cursor Cursor_select;
|
|||||||
Cursor Cursor_default;
|
Cursor Cursor_default;
|
||||||
Cursor Cursor_question;
|
Cursor Cursor_question;
|
||||||
|
|
||||||
struct screen_ctx_q Screenq;
|
struct screen_ctx_q Screenq = TAILQ_HEAD_INITIALIZER(Screenq);
|
||||||
struct screen_ctx *Curscreen;
|
struct screen_ctx *Curscreen;
|
||||||
|
|
||||||
struct client_ctx_q Clientq;
|
struct client_ctx_q Clientq = TAILQ_HEAD_INITIALIZER(Clientq);
|
||||||
|
|
||||||
int HasXinerama, HasRandr, Randr_ev;
|
int HasXinerama, HasRandr, Randr_ev;
|
||||||
int Starting;
|
int Starting;
|
||||||
@ -73,9 +73,7 @@ main(int argc, char **argv)
|
|||||||
Starting = 1;
|
Starting = 1;
|
||||||
dpy_init(display_name);
|
dpy_init(display_name);
|
||||||
|
|
||||||
screen_init();
|
|
||||||
group_init();
|
group_init();
|
||||||
client_init();
|
|
||||||
|
|
||||||
bzero(&Conf, sizeof(Conf));
|
bzero(&Conf, sizeof(Conf));
|
||||||
conf_setup(&Conf, conf_file);
|
conf_setup(&Conf, conf_file);
|
||||||
|
2
calmwm.h
2
calmwm.h
@ -327,7 +327,6 @@ int input_keycodetrans(KeyCode, u_int, enum ctltype *,
|
|||||||
__dead void usage(void);
|
__dead void usage(void);
|
||||||
|
|
||||||
struct client_ctx *client_find(Window);
|
struct client_ctx *client_find(Window);
|
||||||
void client_init(void);
|
|
||||||
struct client_ctx *client_new(Window, struct screen_ctx *, int);
|
struct client_ctx *client_new(Window, struct screen_ctx *, int);
|
||||||
int client_delete(struct client_ctx *);
|
int client_delete(struct client_ctx *);
|
||||||
void client_setactive(struct client_ctx *, int);
|
void client_setactive(struct client_ctx *, int);
|
||||||
@ -388,7 +387,6 @@ void *xmalloc(size_t);
|
|||||||
void *xcalloc(size_t, size_t);
|
void *xcalloc(size_t, size_t);
|
||||||
char *xstrdup(const char *);
|
char *xstrdup(const char *);
|
||||||
|
|
||||||
void screen_init(void);
|
|
||||||
struct screen_ctx *screen_fromroot(Window);
|
struct screen_ctx *screen_fromroot(Window);
|
||||||
struct screen_ctx *screen_current(void);
|
struct screen_ctx *screen_current(void);
|
||||||
void screen_updatestackingorder(void);
|
void screen_updatestackingorder(void);
|
||||||
|
6
client.c
6
client.c
@ -32,12 +32,6 @@ static int client_inbound(struct client_ctx *, int, int);
|
|||||||
static char emptystring[] = "";
|
static char emptystring[] = "";
|
||||||
struct client_ctx *_curcc = NULL;
|
struct client_ctx *_curcc = NULL;
|
||||||
|
|
||||||
void
|
|
||||||
client_init(void)
|
|
||||||
{
|
|
||||||
TAILQ_INIT(&Clientq);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct client_ctx *
|
struct client_ctx *
|
||||||
client_find(Window win)
|
client_find(Window win)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user