unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: Chong Yidong <cyd@stupidchicken.com>,
	"1405@emacsbugs.donarmstrong.com"
	<1405@emacsbugs.donarmstrong.com>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: bug#1405: detached GTK+ tool bar
Date: Mon, 2 Mar 2009 08:01:24 +0100	[thread overview]
Message-ID: <5CDF1AA3-F4F1-4A9E-A789-C4436898E5EF__16363.0212926821$1235978742$gmane$org@swipnet.se> (raw)
In-Reply-To: <878wnpkuku.fsf@escher.local.home>

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 <stephen.berman@gmx.net>:

> On Sat, 17 Jan 2009 21:24:50 +0100 Stephen Berman <stephen.berman@gmx.net 
> > wrote:
>
>> On Thu, 18 Dec 2008 21:46:27 +0100 Stephen Berman <stephen.berman@gmx.net 
>> > wrote:
>>
>>> On Thu, 18 Dec 2008 19:50:22 +0100 Jan Djärv <jan.h.d@swipnet.se 
>>> > wrote:
>>>
>>>> Stephen Berman skrev:
>>>>> On Sun, 23 Nov 2008 12:01:09 +0100 Jan Djärv <jan.h.d@swipne 
>>>>> t.se> wrote:
>>>>>>
>>>>>> I'd rather see if the focus can be kept to the frame.  We can  
>>>>>> perhaps put some
>>>>>> hints to the window manager.  I'll look in to it.  Can the OP  
>>>>>> please tell us
>>>>>> what window manager he is using and what kind of focus model he  
>>>>>> has (click to
>>>>>> focus, focus follows mouse)?
>>>>>
>>>>> I'm using KDE/kwin and click to focus.  But I also see the same  
>>>>> behavior
>>>>> (i.e. focus not returning to the window/frame the tool bar was  
>>>>> 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  
>>> 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  
>> back
>> to the frame after clicking a button on the detached tool bar.  So  
>> 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  
> tool
> bar).  Jan D. or somebody else who's familiar with GTK+ should check  
> to
> make sure it does not cause any problems elsewhere.
>
> Steve Berman
>
>
> 2009-03-01  Stephen Berman  <stephen.berman@gmx.net>
>
>    * 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  
> +0100
> --- emacs/src/gtkutil.c    2009-03-01 17:41:39.000000000 +0100
> ***************
> *** 3461,3466 ****
> --- 3461,3470 ----
>       this is written.  */
>    event.modifiers = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO  
> (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  
> detached
> ***************
> *** 3480,3490 ****
>    xg_tool_bar_callback (wbutton, client_data);
>    FRAME_PTR f = (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  
> item,
> --- 3484,3489 ----
>






  parent reply	other threads:[~2009-03-02  7:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87hc5zcug7.fsf@cyd.mit.edu>
2008-11-23 11:01 ` bug#1405: detached GTK+ tool bar Jan Djärv
2008-11-24  0:10   ` Stephen Berman
     [not found]   ` <87ej12m1ar.fsf@escher.local.home>
2008-11-24  8:03     ` Jan D.
     [not found]     ` <492A5FD1.5040606@swipnet.se>
2008-11-24 15:58       ` Chong Yidong
     [not found]       ` <87hc5xazfx.fsf@cyd.mit.edu>
2008-11-24 21:41         ` Jan Djärv
2008-12-18 18:50     ` Jan Djärv
2008-12-18 20:46       ` Stephen Berman
2009-01-17 20:24         ` Stephen Berman
2009-03-01 17:43           ` Stephen Berman
     [not found]           ` <878wnpkuku.fsf@escher.local.home>
2009-03-02  7:01             ` Jan D. [this message]
2009-03-02  8:30               ` Stephen Berman
2009-03-14 15:12                 ` Jan Djärv
     [not found]       ` <87tz91ky8s.fsf@escher.local.home>
2008-12-19  7:38         ` Jan D.
2008-11-23 11:02 ` Jan Djärv
2008-11-22 21:38 Chong Yidong
2008-11-22 23:08 ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='5CDF1AA3-F4F1-4A9E-A789-C4436898E5EF__16363.0212926821$1235978742$gmane$org@swipnet.se' \
    --to=jan.h.d@swipnet.se \
    --cc=1405@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).