GNU bug report logs - #56561
29.0.50; Infloop in try_window

Previous Next

Package: emacs;

Reported by: Michael Welsh Duggan <md5i <at> md5i.com>

Date: Thu, 14 Jul 2022 18:58:01 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mwd <at> md5i.com, 56561 <at> debbugs.gnu.org
Subject: bug#56561: 29.0.50; Infloop in try_window
Date: Sat, 16 Jul 2022 11:14:57 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> On third thought, why do we even call try_window there?  The original
> code needed try_window because it then used the glyph matrix it
> produces to calculate the size of the tooltip.  But we've dumped that
> code, and we nowadays use window-text-pixel-size instead, which
> emulates the display internally anyway.  So I think we should simply
> delete the call to try_window from x-show-tip, and be done.  At least
> on master.

That leads to blank tooltips inside popup menus.

Here is the vital code in this case:

  clear_glyph_matrix (w->desired_matrix);
  clear_glyph_matrix (w->current_matrix);
  SET_TEXT_POS (pos, BEGV, BEGV_BYTE);
  try_window (window, pos, TRY_WINDOW_IGNORE_FONTS_CHANGE);
  [...]
  w->must_be_updated_p = true;
  update_single_window (w);
  flush_frame (tip_f);

Otherwise, the contents of the tooltip will not be visible by the time
the tooltip is displayed, and will not be generated, as redisplay cannot
happen inside a popup menu.




This bug report was last modified 2 years and 330 days ago.

Previous Next


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