Package: xdm
Version: 1:1.1.8-5
Severity: minor
Tags: patch

Hi,

These steps reproduce the issue:

  - Enter a username and a _wrong_ password into xdm's login window.
  - A message "Login incorrect" appears.
  - After a few seconds, the "Login" field appears again.
    (So far, everything works as expected.)
  - Type the first character of a username.

This clears the part of the "Login incorrect" message below the baseline
(i.e. the descent part of the letter 'g').

Looking at the source code, greeter/Login.c in particular, the intention
seems to be to clear the message by means of the XClearArea function.
However, the code uses the baseline of the text as the y coordinate of
the top edge of the area to clear, therfore clearing only the part below
the baseline.

The attached patch fixes this issue.

Best regards,
Martin


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xdm depends on:
ii  cpp                           4:4.3.3-2  The GNU C preprocessor (cpp)
ii  debconf [debconf-2.0]         1.5.26     Debian configuration management sy
ii  libc6                         2.9-4      GNU C Library: Shared libraries
ii  libpam0g                      1.0.1-9    Pluggable Authentication Modules l
ii  libselinux1                   2.0.71-1   SELinux shared libraries
ii  libsm6                        2:1.1.0-2  X11 Session Management library
ii  libx11-6                      2:1.2.1-1  X11 client-side library
ii  libxau6                       1:1.0.4-2  X11 authorisation library
ii  libxaw7                       2:1.0.5-2  X11 Athena Widget library
ii  libxdmcp6                     1:1.0.2-3  X11 Display Manager Control Protoc
ii  libxext6                      2:1.0.4-1  X11 miscellaneous extension librar
ii  libxft2                       2.1.13-3   FreeType-based font drawing librar
ii  libxinerama1                  2:1.0.3-2  X11 Xinerama extension library
ii  libxmu6                       2:1.0.4-1  X11 miscellaneous utility library
ii  libxpm4                       1:3.5.7-1  X11 pixmap library
ii  libxrender1                   1:0.9.4-2  X Rendering Extension client libra
ii  libxt6                        1:1.0.5-3  X11 toolkit intrinsics library
ii  lsb-base                      3.2-22     Linux Standard Base 3.2 init scrip
ii  x11-common                    1:7.3+18   X Window System (X.Org) infrastruc
ii  x11-utils                     7.4+1      X11 utilities

xdm recommends no packages.

Versions of packages xdm suggests:
ii  xutils                        1:7.3+18   X Window System utility programs m

-- debconf information:
  xdm/stop_running_server_with_children: false
  xdm/daemon_name: /usr/bin/xdm
* shared/default-x-display-manager: xdm
diff -ur xdm-1.1.8.orig/greeter/Login.c xdm-1.1.8/greeter/Login.c
--- xdm-1.1.8.orig/greeter/Login.c	2008-05-21 20:08:45.000000000 +0200
+++ xdm-1.1.8/greeter/Login.c	2009-04-25 21:23:50.000000000 +0200
@@ -629,7 +629,7 @@
 		    x = ERROR_X(w, start);
 #ifdef USE_XFT
 		    if (w->login.failUp == 0) {
-			XClearArea(XtDisplay(w), XtWindow(w), x, y,
+			XClearArea(XtDisplay(w), XtWindow(w), x, y - F_ASCENT(fail),
 				   ERROR_W(w, start), FAIL_Y_INC(w), False);
 		    } else
 #endif		    
@@ -650,7 +650,7 @@
 
 #ifdef USE_XFT
 	if (w->login.failUp == 0) {
-	    XClearArea(XtDisplay(w), XtWindow(w), x, y,
+	    XClearArea(XtDisplay(w), XtWindow(w), x, y - F_ASCENT(fail),
 		       ERROR_W(w, w->login.fail), FAIL_Y_INC(w), False);
 	} else
 #endif		    

Reply via email to