|
From: | Jan D. |
Subject: | Re: coord conversion: frame->column_width set wrong? |
Date: | Sun, 25 Jul 2004 12:49:14 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 |
address@hidden wrote:
Tests: (coordinates-in-window-p '( 0 . 0) (selected-window)) should return: (0 . 0) bug condition returns: nil (window-at 0 0) should return: #<window 3 on *scratch*> (or similar) bug condition returns: nil (coordinates-in-window-p '( 1 . 1) (selected-window)) should return: (1 . 1) bug condition returns: (0.8571428571428571 . 0.9230769230769231)
Name changes: coordinates-in-window-p uses the macro PIXEL_X_FROM_CANON_X -> FRAME_PIXEL_X_FROM_CANON_Xwhich calls CANON_X_UNIT -> FRAME_COLUMN_WIDTHOn a window system, CANON_X_UNIT was a wrapper forFRAME_DEFAULT_FONT_WIDTH, defined in xterm.h, macterm.h, and w32term.h. FRAME_DEFAULT_FONT_WIDTH no longer exists, and in its place,FRAME_COLUMN_WIDTH simply reads the field column_width from the frame data structure. This value gets initialized to 1 in make_frame, but I couldn't find a place where it gets set based on the font. Perhaps it isn't being set at all?
It is being set in xterm.c, x_new_font: FRAME_COLUMN_WIDTH (f) = FONT_WIDTH (FRAME_FONT (f)); The inconsistency seems to have another cause, see the thread "Fix `window-at' and `coordinates-in-window-p'" Jan D.
[Prev in Thread] | Current Thread | [Next in Thread] |