[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coord conversion: frame->column_width set wrong?

From: jbyler+emacs-lists
Subject: coord conversion: frame->column_width set wrong?
Date: Wed, 16 Jun 2004 17:00:57 -0400

I'd like to reopen discussion on an apparent problem with the conversion
from canonical coordinates to pixel coordinates.  I believe that the
frame->column_width value is being set up incorrectly in X Windows on my
Red Hat 9 system.  The symptom is that windmove doesn't work well, but
the problem can be observed by running some tests I will describe below.
 My results:

        5/14/2003 build from CVS   6/~12/04 build from CVS

-nw        good                        good

X/11       good                        *bug*

Setup: emacs -q &
M-x scroll-bar-mode
M-x fringe-mode (none)
M-x tool-bar-mode
M-x menu-bar-mode
... to get a bare-bones frame.

(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)

Looking through the changes made to the functions in question, I came
across only one significant change that I think could have caused this:

Name changes:
coordinates-in-window-p uses the macro
which calls 

On a window system, CANON_X_UNIT was a wrapper for
FRAME_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?

Some clips from prior discussion:

Robert J. Chassell, Re: windmove and the minibuffer

Luc Teirlinck, Re: windmove and the minibuffer

Luc Teirlinck, Re: ruler-mode is broken

Jesse Byler

The information contained in this electronic mail
and any attached document is the confidential and
proprietary business information of Forum Systems,
Inc. It is intended solely for the addressed
recipient listed above. It may not be distributed
in any manner without the express written consent
of Forum Systems, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]