From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.bugs Subject: bug#1405: detached GTK+ tool bar Date: Mon, 2 Mar 2009 08:01:24 +0100 Message-ID: <5CDF1AA3-F4F1-4A9E-A789-C4436898E5EF__16363.0212926821$1235978742$gmane$org@swipnet.se> References: <87hc5zcug7.fsf@cyd.mit.edu> <492937F5.1040301__9972.48901189796$1227438707$gmane$org@swipnet.se> <87ej12m1ar.fsf@escher.local.home> <494A9B6E.6060307__43219.0094412819$1229627215$gmane$org@swipnet.se> <87tz91ky8s.fsf__3258.61482783711$1229634381$gmane$org@escher.local.home> <87d4el4r59.fsf__38436.7469735027$1232225105$gmane$org@escher.local.home> <878wnpkuku.fsf@escher.local.home> Reply-To: "Jan D." , 1405@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (iPhone Mail 5H11) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1235978660 9808 80.91.229.12 (2 Mar 2009 07:24:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2009 07:24:20 +0000 (UTC) Cc: Chong Yidong , "1405@emacsbugs.donarmstrong.com" <1405@emacsbugs.donarmstrong.com>, "emacs-devel@gnu.org" To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 02 08:25:36 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Le2Wd-0003Wa-99 for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Mar 2009 08:25:36 +0100 Original-Received: from localhost ([127.0.0.1]:43935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Le2VG-0006X8-KM for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Mar 2009 02:23:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Le2VB-0006X3-PK for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2009 02:23:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Le2VA-0006Wk-Ar for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2009 02:23:49 -0500 Original-Received: from [199.232.76.173] (port=39678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Le2VA-0006Wb-5J for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2009 02:23:48 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58558) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Le2V8-0006Xe-Ng for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2009 02:23:48 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n227NcfJ001211; Sun, 1 Mar 2009 23:23:38 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n227A5Vs030225; Sun, 1 Mar 2009 23:10:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Jan D." Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 02 Mar 2009 07:10:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1405 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1405-submit@emacsbugs.donarmstrong.com id=B1405.123597730228076 (code B ref 1405); Mon, 02 Mar 2009 07:10:05 +0000 Original-Received: (at 1405) by emacsbugs.donarmstrong.com; 2 Mar 2009 07:01:42 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from proxy2.bredband.net (proxy2.bredband.net [195.54.101.72]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2271c2m028058 for <1405@emacsbugs.donarmstrong.com>; Sun, 1 Mar 2009 23:01:39 -0800 Original-Received: from ironport2.bredband.com (195.54.101.122) by proxy2.bredband.net (7.3.139) id 49A5128F001F58A5 for 1405@emacsbugs.donarmstrong.com; Mon, 2 Mar 2009 08:01:32 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As85APoSq0lV4S1uPGdsb2JhbACBWZJ3AQEBATW/QYQaBg Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ironport2.bredband.com with ESMTP; 02 Mar 2009 08:01:31 +0100 Original-Received: from [10.145.138.188] (host-90-234-53-213.mobileonline.telia.com [90.234.53.213]) by coolsville.localdomain (Postfix) with ESMTPSA id 374297FA07B; Mon, 2 Mar 2009 08:01:30 +0100 (CET) In-Reply-To: <878wnpkuku.fsf@escher.local.home> X-Mailer: iPhone Mail (5H11) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 02 Mar 2009 02:23:49 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25905 Archived-At: How does this work when the button is a menu, i.e. help? I will be travelling for 2 weeks. I can't test it until then. Jan D. 1 mar 2009 kl. 18.43 skrev Stephen Berman : > On Sat, 17 Jan 2009 21:24:50 +0100 Stephen Berman = > wrote: > >> On Thu, 18 Dec 2008 21:46:27 +0100 Stephen Berman = > > wrote: >> >>> On Thu, 18 Dec 2008 19:50:22 +0100 Jan Dj=C3=A4rv = >> > wrote: >>> >>>> Stephen Berman skrev: >>>>> On Sun, 23 Nov 2008 12:01:09 +0100 Jan Dj=C3=A4rv >>>> t.se> wrote: >>>>>> >>>>>> I'd rather see if the focus can be kept to the frame. We can =20 >>>>>> perhaps put some >>>>>> hints to the window manager. I'll look in to it. Can the OP =20 >>>>>> please tell us >>>>>> what window manager he is using and what kind of focus model he =20= >>>>>> has (click to >>>>>> focus, focus follows mouse)? >>>>> >>>>> I'm using KDE/kwin and click to focus. But I also see the same =20= >>>>> behavior >>>>> (i.e. focus not returning to the window/frame the tool bar was =20 >>>>> detached >>>>> from) with a focus follows mouse policy. >>>>> >>>> >>>> I've made a change, can you test it? >>>> >>>> Thanks, >>>> >>>> Jan D. >>> >>> I just did, and confirm that focus now switches back to the frame =20= >>> after >>> clicking a button on the detached tool bar. Thanks! >> >> I just learned about the variable x-gtk-whole-detached-tool-bar; when >> this is non-nil and the tool bar is detached, focus fails to switch =20= >> back >> to the frame after clicking a button on the detached tool bar. So =20= >> your >> fix does not work with x-gtk-whole-detached-tool-bar non-nil. >> >> In GNU Emacs 23.0.60.29 (i686-pc-linux-gnu, GTK+ Version 2.14.4) of >> 2009-01-11 on escher >> >> Steve Berman > > The patch below (against the current CVS trunk) makes focus return to > the frame regardless of the value of x-gtk-whole-detached-tool-bar > (i.e., it works both with the proxy (arrow) and the whole detached =20 > tool > bar). Jan D. or somebody else who's familiar with GTK+ should check =20= > to > make sure it does not cause any problems elsewhere. > > Steve Berman > > > 2009-03-01 Stephen Berman > > * gtkutil.c (xg_tool_bar_callback): Return focus to the frame > after we have clicked on a detached tool bar button (bug#1405). > This replaces the reverted change below. > (xg_tool_bar_proxy_callback): Revert previous change (bug#1405). > > > *** emacs/src/gtkutil.c.~1.146.~ 2009-03-01 17:06:07.000000000 =20 > +0100 > --- emacs/src/gtkutil.c 2009-03-01 17:41:39.000000000 +0100 > *************** > *** 3461,3466 **** > --- 3461,3470 ---- > this is written. */ > event.modifiers =3D x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO =20= > (f), mod); > kbd_buffer_store_event (&event); > + > + /* Return focus to the frame after we have clicked on a detached > + tool bar button. */ > + Fx_focus_frame (frame); > } > > /* Callback function invoked when a tool bar item is pressed in a =20 > detached > *************** > *** 3480,3490 **** > xg_tool_bar_callback (wbutton, client_data); > FRAME_PTR f =3D (FRAME_PTR) g_object_get_data (G_OBJECT (wbutton), > XG_FRAME_DATA); > - /* Put focus back to the frame after we have clicked on a detached > - tool bar button. */ > - Lisp_Object frame; > - XSETFRAME (frame, f); > - Fx_focus_frame (frame); > } > > /* This callback is called when a tool item should create a proxy =20 > item, > --- 3484,3489 ---- >