From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: text mode menubar events get confused by left margin Date: Tue, 3 Apr 2007 22:23:18 +1200 Message-ID: <17938.11030.644551.51492@farnswood.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1175595965 27048 80.91.229.12 (3 Apr 2007 10:26:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2007 10:26:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 03 12:25:58 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HYgD8-0007XY-Cw for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2007 12:25:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYgGG-0003eQ-58 for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2007 06:29:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYgGC-0003eH-7c for emacs-devel@gnu.org; Tue, 03 Apr 2007 06:29:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYgGA-0003e5-JO for emacs-devel@gnu.org; Tue, 03 Apr 2007 06:29:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYgGA-0003e2-EG for emacs-devel@gnu.org; Tue, 03 Apr 2007 06:29:06 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HYgD1-0005in-ET for emacs-devel@gnu.org; Tue, 03 Apr 2007 06:25:51 -0400 Original-Received: from farnswood.snap.net.nz (2.62.255.123.dynamic.snap.net.nz [123.255.62.2]) by viper.snap.net.nz (Postfix) with ESMTP id 9DE473DA0DE for ; Tue, 3 Apr 2007 22:25:48 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 500) id 6665C627ED; Tue, 3 Apr 2007 11:23:19 +0100 (BST) X-Mailer: VM 7.19 under Emacs 22.0.96.5 X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68988 Archived-At: 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