Re: [dev] [slock][PATCH] Caps Lock colour

From: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Mon, 28 Apr 2014 14:49:37 +0200

Martin Kopta wrote:
> XSetWindowBackground(dpy, locks[screen]->win, (ev.xkey.state && LockMask) ?
> locks[screen]->colors[2] : locks[screen]->colors[1]);

And while we're at it, how about:

XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[(ev.xkey.state && LockMask) ? 2 : 1]);

Also you should check if ev.xkey.state and LockMask are bool values, because I
think these are bit fields which should be checked by:

ev.xkey.state & LockMask

--Markus
Received on Mon Apr 28 2014 - 14:49:37 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 28 2014 - 15:00:08 CEST