GNU bug report logs -
#52142
28.0.60; `posn-object-width-height' does not reflect actual dimensions of object when confronted by display string
Previous Next
Reported by: Po Lu <luangruo <at> yahoo.com>
Date: Sat, 27 Nov 2021 12:01:02 UTC
Severity: normal
Tags: notabug
Found in version 28.0.60
Done: Po Lu <luangruo <at> yahoo.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
> That's a feature. Maybe it isn't documented clearly enough, but
> basically as long as there's a character displayed at that position,
> WIDTH and HEIGHT give the dimensions of that character's glyph on
> display.
Hmm, okay. I think the documentation in (elisp)Click Events could do
with some improvement:
WIDTH, HEIGHT
These are the pixel width and height of OBJECT or, if this is
‘nil’, those of the character glyph clicked on.
For clicks on a scroll bar, POSITION has this form:
(WINDOW AREA (PORTION . WHOLE) TIMESTAMP PART)
Should probably be
WIDTH, HEIGHT
These are the pixel width and height of the character glyph clicked
on, or, if none exists, the pixel width and height of OBJECT.
For clicks on a scroll bar, POSITION has this form:
(WINDOW AREA (PORTION . WHOLE) TIMESTAMP PART)
> Remember: this stuff was originally designed for mouse clicks, where
> it's important to know what did you click on.
Thanks. On a slightly unrelated topic, what would be the appropriate
method to obtain the height of such a display string? I'm trying to
make the pixel scrolling machinery work with such text, and while
scrolling down already works, I have no idea how to implement scrolling
up, which currently relies on going to the last screen line, then
adjusting vscroll the remainder of the way, which naturally requires a
way to fetch the height of the display string.
This bug report was last modified 3 years and 177 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.