summaryrefslogtreecommitdiff
path: root/sent.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2015-11-17 01:00:30 +0100
committerMarkus Teich <markus.teich@stusta.mhn.de>2015-11-17 01:04:04 +0100
commit4a828c2d6c2d16f77c0d110b31648462b28cc271 (patch)
tree918f8c2662680a02d36b38cf5076328d4cb053da /sent.c
parentaa713a8a342ec0e6eca173cd4489834f8baa0a86 (diff)
prevent flickering when changing slides
When the window background is left at WhitePixel (from initialization) and the user has set a dark background color in config.h, the window shortly displays the white default background when clearing after advancing to another slide. This was very disturbing and is fixed now by setting the default window background color to the bgcol chosen in config.h.
Diffstat (limited to 'sent.c')
-rw-r--r--sent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sent.c b/sent.c
index 5e47815..4e2e810 100644
--- a/sent.c
+++ b/sent.c
@@ -572,14 +572,13 @@ void xinit()
xw.vis = XDefaultVisual(xw.dpy, xw.scr);
resize(DisplayWidth(xw.dpy, xw.scr), DisplayHeight(xw.dpy, xw.scr));
- xw.attrs.background_pixel = WhitePixel(xw.dpy, xw.scr);
xw.attrs.bit_gravity = CenterGravity;
xw.attrs.event_mask = KeyPressMask | ExposureMask | StructureNotifyMask
| ButtonMotionMask | ButtonPressMask;
xw.win = XCreateWindow(xw.dpy, XRootWindow(xw.dpy, xw.scr), 0, 0,
xw.w, xw.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput, xw.vis,
- CWBackPixel | CWBitGravity | CWEventMask, &xw.attrs);
+ CWBitGravity | CWEventMask, &xw.attrs);
xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False);
xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False);
@@ -589,6 +588,7 @@ void xinit()
die("Can't create drawing context.");
sc = drw_scm_create(d, fgcol, bgcol);
drw_setscheme(d, sc);
+ XSetWindowBackground(xw.dpy, xw.win, sc->bg.pix);
xloadfonts();