From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: tool bar: C-... and S-... fail in GTK builds Date: Wed, 15 Feb 2006 11:57:08 +0100 (CET) Message-ID: <200602151057.k1FAv8lR009084@coolsville.localdomain> References: <87acct7u0e.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1140009113 28715 80.91.229.2 (15 Feb 2006 13:11:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2006 13:11:53 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 15 14:11:51 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F9MRQ-0000pk-1c for ged-emacs-devel@m.gmane.org; Wed, 15 Feb 2006 14:11:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F9MO1-0005Qu-Ho for ged-emacs-devel@m.gmane.org; Wed, 15 Feb 2006 08:08:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F9KMC-0004sf-EC for emacs-devel@gnu.org; Wed, 15 Feb 2006 05:58:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F9KM7-0004nZ-O2 for emacs-devel@gnu.org; Wed, 15 Feb 2006 05:57:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F9KM5-0004jz-9N for emacs-devel@gnu.org; Wed, 15 Feb 2006 05:57:54 -0500 Original-Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F9KQx-0004dz-Kd for emacs-devel@gnu.org; Wed, 15 Feb 2006 06:02:56 -0500 Original-Received: from coolsville.localdomain ([83.226.180.152] [83.226.180.152]) by mxfep01.bredband.com with ESMTP id <20060215105750.JBNJ12400.mxfep01.bredband.com@coolsville.localdomain>; Wed, 15 Feb 2006 11:57:50 +0100 Original-Received: (from jhd@localhost) by coolsville.localdomain (8.13.4/8.13.4/Submit) id k1FAv8lR009084; Wed, 15 Feb 2006 11:57:08 +0100 In-Reply-To: <87acct7u0e.fsf@jurta.org> "from Juri Linkov at Feb 14, 2006 07:43:14 pm" Original-To: Juri Linkov 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:50563 Archived-At: > >>>> (define-key tool-bar-map [S-help] 'info) > >>> Did you try with a GTK build? It fails with GTK for me, but it works > >>> with an X toolkit build: > >> Yes, it failed for me with a GTK build, and now I've verified that > >> it works with a non-toolkit build. So there is a bug in GTK builds. > > > > I've fixed it now. The modifiers are not available for the callback that > > GTK invokes when a button is clicked, so previously I just set the > > modifiers to zero. I didn't realize there was a use for them. > > Thanks! Could you see how hard would be to implement mouse-2 and mouse-3 > clicking on a tool bar item? Is the main obstacle only in the format > of the menu keymap specification? It is not hard on the C level. we can put the button clicked in the code part of the struct input_event, and keyboard.c would then look at that also when constructing an event (currently code is ignored for tool bar events). But I don't know to construct the Lisp event. It could be done like for native scroll bars. It is a mouse-event with a position that says scroll bar. But the lisp code expects the position to contain a window, but for non-native tool bars (i.e. GTK) there is no window to put in there, just a frame. Jan D. Jan D.