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

From: Thiébaud Weksteen <thiebaud_AT_weksteen.fr>
Date: Mon, 28 Apr 2014 20:05:59 +1000

Hi,

>> - if(llen == 0 && len != 0) {
>> + caps_state = ev.xkey.state && LockMask;
>> + if((llen == 0 && len != 0)) {
>
> Why the extra parentheses in the if statement?

A prior test was including another condition. It was a leftover from that.

>
>> - 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?
>

See attached!

Cheers,

Thiébaud


Received on Mon Apr 28 2014 - 12:05:59 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 28 2014 - 12:12:06 CEST