GNU bug report logs - #8992
23.3.50; Wrong mouse highlight background ascent and height

Previous Next

Package: emacs;

Reported by: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Date: Sun, 3 Jul 2011 23:43:01 UTC

Severity: normal

Found in version 23.3.50

Fixed in version 24.0.93

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8992 in the body.
You can then email your comments to 8992 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8992; Package emacs. (Sun, 03 Jul 2011 23:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 03 Jul 2011 23:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.3.50; Wrong mouse highlight background ascent and height
Date: Mon, 04 Jul 2011 08:42:37 +0900
[Message part 1 (text/plain, inline)]
Steps to reproduce:

  1. $ emacs -q -fn courier
  2. Move the mouse pointer over "Emacs Tutorial" in the splash screen.

Result:

  Mouse highlight does not fill the whole background (see the first
  attachment).

The patch below seems to work (see the second attachment).  I think
colors should be extracted from s->face, but font metrics should be
obtained from s->font.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp

=== modified file 'src/xftfont.c'
*** src/xftfont.c	2011-02-02 02:15:29 +0000
--- src/xftfont.c	2011-07-03 07:03:15 +0000
***************
*** 689,695 ****
  
    if (with_background)
      XftDrawRect (xft_draw, &bg,
! 		 x, y - face->font->ascent, s->width, face->font->height);
    code = alloca (sizeof (FT_UInt) * len);
    for (i = 0; i < len; i++)
      code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
--- 689,695 ----
  
    if (with_background)
      XftDrawRect (xft_draw, &bg,
! 		 x, y - s->font->ascent, s->width, s->font->height);
    code = alloca (sizeof (FT_UInt) * len);
    for (i = 0; i < len; i++)
      code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/home/mituharu/src/bzr/emacs/emacs-23/etc/DEBUG.


In GNU Emacs 23.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
 of 2011-07-04 on mituharu-MacBookAir
Windowing system distributor `The X.Org Foundation', version 11.0.11001000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu> 
<send-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug japan-util
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
font-setting tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)
[wrong.png (image/png, inline)]
[right.png (image/png, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8992; Package emacs. (Thu, 15 Dec 2011 02:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 8992 <at> debbugs.gnu.org (full text, mbox):

From: Kenichi Handa <handa <at> m17n.org>
To: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 8992 <at> debbugs.gnu.org
Subject: Re: bug#8992: 23.3.50;
	Wrong mouse highlight background ascent and height
Date: Thu, 15 Dec 2011 11:15:53 +0900
In article <wlliwf0w42.wl%mituharu <at> math.s.chiba-u.ac.jp>, YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp> writes:

> Steps to reproduce:

>   1. $ emacs -q -fn courier
>   2. Move the mouse pointer over "Emacs Tutorial" in the splash screen.

> Result:

>   Mouse highlight does not fill the whole background (see the first
>   attachment).

> The patch below seems to work (see the second attachment).  I think
> colors should be extracted from s->face, but font metrics should be
> obtained from s->font.

You are right.  Thank you for the report and the patch.
I've just installed it.  I checked the other XXX_draw
functions and it seems that they are doing the right thing.

---
Kenichi Handa
handa <at> m17n.org

> === modified file 'src/xftfont.c'
> *** src/xftfont.c	2011-02-02 02:15:29 +0000
> --- src/xftfont.c	2011-07-03 07:03:15 +0000
> ***************
> *** 689,695 ****
  
>     if (with_background)
>       XftDrawRect (xft_draw, &bg,
> ! 		 x, y - face->font->ascent, s->width, face->font->height);
>     code = alloca (sizeof (FT_UInt) * len);
>     for (i = 0; i < len; i++)
>       code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
> --- 689,695 ----
  
>     if (with_background)
>       XftDrawRect (xft_draw, &bg,
> ! 		 x, y - s->font->ascent, s->width, s->font->height);
>     code = alloca (sizeof (FT_UInt) * len);
>     for (i = 0; i < len; i++)
>       code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)




bug marked as fixed in version 24.0.93, send any further explanations to 8992 <at> debbugs.gnu.org and YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 16 Dec 2011 23:43:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 14 Jan 2012 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.