all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* text mode menubar events get confused by left margin
@ 2007-04-03 10:23 Nick Roberts
  2007-04-03 21:49 ` Nick Roberts
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Roberts @ 2007-04-03 10:23 UTC (permalink / raw)
  To: emacs-devel


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-03 21:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-03 10:23 text mode menubar events get confused by left margin Nick Roberts
2007-04-03 21:49 ` Nick Roberts

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.