Re: [dev] [slock] [PATCH] Option to not show failure color on clear

From: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Wed, 6 May 2015 17:20:47 +0200

Heyho,

Nick Currier wrote:
> This patch adds the failonclear boolean option so that, when false,
> the failure color will not appear until a failed login attempt has
> been made.
> It also maintains the existing behaviour (failure on clear) by default.

I think the new behaviour actually is a more reasonable default.

> + if (failure || failonclear) {
> + for (screen = 0; screen < nscreens; screen++) {
> + XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[FAILED]);
> + XClearWindow(dpy, locks[screen]->win);
> + }
> + } else {
> + for (screen = 0; screen < nscreens; screen++) {
> + XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[INIT]);
> + XClearWindow(dpy, locks[screen]->win);
> + }

Can you also change this to use

locks[screen]->colors[failure || failonclear ? FAILED : INIT]

instead of the outer if-else block?

--Markus
Received on Wed May 06 2015 - 17:20:47 CEST

This archive was generated by hypermail 2.3.0 : Wed May 06 2015 - 17:24:13 CEST