emacs-devel
[Top][All Lists]
Advanced

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

text mode menubar events get confused by left margin


From: Nick Roberts
Subject: text mode menubar events get confused by left margin
Date: Tue, 3 Apr 2007 22:23:18 +1200

If a buffer has a non-zero left margin where are the co-ordinates of the text
mode menubar measured from?

Here's a recipe for looking at what Emacs does:

With emacs -nw, or in a console

Load tmm (click on the menubar).
Run gdb in Emacs.
Set a breakpoint in a source file.  This generates a margin.
Instrument tmm-menubar-mouse with Edebug.

Click on the menubar on the first characters of the menubar and
evaluate event.

The margin is two characters wide.  If I click on the first four characters
I get:

1  (mouse-1 (nil menu-bar (0 . 0) 1541858 nil 1 (2 . 0) nil (0 . 0) (0 . 1)))
2  (mouse-1 (nil menu-bar (1 . 0) 1551105 nil 1 (3 . 0) nil (1 . 0) (0 . 1)))
3  (mouse-1 (nil menu-bar (0 . 0) 1560616 nil 1 (0 . 0) nil (0 . 0) (1 . 0)))
4  (mouse-1 (nil menu-bar (1 . 0) 1567674 nil 2 (1 . 0) nil (0 . 0) (1 . 0)))

I can't make sense of this.  I feel that I should be able to add two numbers
to get the number on the left.


-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

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