mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
push Screenq into screen_init
This commit is contained in:
7
screen.c
7
screen.c
@ -31,13 +31,16 @@
|
||||
#include "calmwm.h"
|
||||
|
||||
void
|
||||
screen_init(struct screen_ctx *sc, u_int which)
|
||||
screen_init(u_int which)
|
||||
{
|
||||
struct screen_ctx *sc;
|
||||
Window *wins, w0, w1;
|
||||
XWindowAttributes winattr;
|
||||
XSetWindowAttributes rootattr;
|
||||
u_int nwins, i;
|
||||
|
||||
sc = xcalloc(1, sizeof(*sc));
|
||||
|
||||
sc->which = which;
|
||||
sc->visual = DefaultVisual(X_Dpy, sc->which);
|
||||
sc->colormap = DefaultColormap(X_Dpy, sc->which);
|
||||
@ -84,6 +87,8 @@ screen_init(struct screen_ctx *sc, u_int which)
|
||||
if (HasRandr)
|
||||
XRRSelectInput(X_Dpy, sc->rootwin, RRScreenChangeNotifyMask);
|
||||
|
||||
TAILQ_INSERT_TAIL(&Screenq, sc, entry);
|
||||
|
||||
XSync(X_Dpy, False);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user