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

From: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Sun, 27 Apr 2014 12:43:15 +0200

Heyho,

ThiƩbaud Weksteen wrote:
> - if(llen == 0 && len != 0) {
> + caps_state = ev.xkey.state && LockMask;
> + if((llen == 0 && len != 0)) {

Why the extra parentheses in the if statement?

> - XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[1]);
> + if(caps_state)
> + XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[2]);
> + else
> + XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[1]);

How about the ?: operator here?

--Markus
Received on Sun Apr 27 2014 - 12:43:15 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 27 2014 - 12:48:06 CEST