mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
properly teardown X connection upon quit; static a few while here,
requested by oga@ ok oga@ sometime ago
This commit is contained in:
parent
8a490fc270
commit
ea96e92ac8
16
calmwm.c
16
calmwm.c
@ -40,6 +40,9 @@ struct conf Conf;
|
|||||||
|
|
||||||
static void _sigchld_cb(int);
|
static void _sigchld_cb(int);
|
||||||
static void dpy_init(const char *);
|
static void dpy_init(const char *);
|
||||||
|
static void x_setup(void);
|
||||||
|
static void x_setupscreen(struct screen_ctx *, u_int);
|
||||||
|
static void x_teardown(void);
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
@ -97,6 +100,8 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
xev_loop();
|
xev_loop();
|
||||||
|
|
||||||
|
x_teardown();
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +148,17 @@ x_setup(void)
|
|||||||
Cursor_question = XCreateFontCursor(X_Dpy, XC_question_arrow);
|
Cursor_question = XCreateFontCursor(X_Dpy, XC_question_arrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
x_teardown(void)
|
||||||
|
{
|
||||||
|
struct screen_ctx *sc;
|
||||||
|
|
||||||
|
TAILQ_FOREACH(sc, &Screenq, entry)
|
||||||
|
XFreeGC(X_Dpy, sc->gc);
|
||||||
|
|
||||||
|
XCloseDisplay(X_Dpy);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
x_setupscreen(struct screen_ctx *sc, u_int which)
|
x_setupscreen(struct screen_ctx *sc, u_int which)
|
||||||
{
|
{
|
||||||
|
2
calmwm.h
2
calmwm.h
@ -310,8 +310,6 @@ int input_keycodetrans(KeyCode, u_int, enum ctltype *,
|
|||||||
char *);
|
char *);
|
||||||
|
|
||||||
int x_errorhandler(Display *, XErrorEvent *);
|
int x_errorhandler(Display *, XErrorEvent *);
|
||||||
void x_setup(void);
|
|
||||||
void x_setupscreen(struct screen_ctx *, u_int);
|
|
||||||
__dead void usage(void);
|
__dead void usage(void);
|
||||||
|
|
||||||
struct client_ctx *client_find(Window);
|
struct client_ctx *client_find(Window);
|
||||||
|
Loading…
Reference in New Issue
Block a user