• Bug#267076: xtrlock: [patch] could use different colors to show status

    From Javier Donaire@1:229/2 to All on Fri Aug 20 17:10:13 2004
    From: [email protected]

    This is a multi-part MIME message sent by reportbug.

    Package: xtrlock
    Version: 2.0-8
    Severity: wishlist


    It is confusing to use xtrlock because there is no information of the
    status of the user's input. With this patch the cursor changes its color
    to green if a password is being typed, and changes it again to red for a
    second if a bad try is done.

    In addition to this:
    - xtrlock don't do annoying beeps if the display is color capable
    because the colors provide enough information by themselves.
    - The no-type pause after a bad try is constant. This makes xtrlock
    more comfortable to use.
    - Some minor changes to ensure compatibility with gcc 3.4.

    This increases the executable size by only 264 bytes.



    -- System Information:
    Debian Release: 3.1
    APT prefers unstable
    APT policy: (500, 'unstable')
    Architecture: i386 (i686)
    Kernel: Linux 2.6.8-1-686
    Locale: LANG=es_ES, LC_CTYPE=es_ES

    Versions of packages xtrlock depends on:
    ii libc6 2.3.2.ds1-16 GNU C Library: Shared libraries an ii libx11-6 4.3.0.dfsg.1-6 X Window System protocol client li ii xlibs 4.3.0.dfsg.1-6 X Window System client libraries m

    -- no debconf information

    --- xtrlock-2.0_original/xtrlock.c 2002-09-01 06:46:29.000000000 +0200
    +++ xtrlock-2.0/xtrlock.c 2004-08-20 16:16:17.000000000 +0200
    @@ -14,6 +14,14 @@
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    + *
    + *
    + * Javier Donaire Segarra <[email protected]> Fri, 20 Aug 2004 16:12:44 +0200 + * - Color of cursor changes to report the user input's status
    + * - Beeps replaced by color information if the display is color capable
    + * - Constant retry timeout of 1 sec to be more intuitive
    + * - Minor changes to ensure compatibility with new versions of gcc
    + *
    */

    #include <X11/X.h>
    @@ -48,10 +56,6 @@
    Display *display;
    Window window, root;

    -#define TIMEOUTPERATTEMPT 30000
    -#define MAXGOODWILL (TIMEOUTPERATTEMPT*5)
    -#define INITIALGOODWILL MAXGOODWILL
    -#define GOODWILLPORTION 0.3

    struct passwd *pw;
    int passwordok(const char *s) {
    @@ -71,17 +7