]> git.eshelyaron.com Git - emacs.git/commitdiff
* gtkutil.c (xg_tool_bar_callback): Set focus back to the frame
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 14 Mar 2009 15:12:33 +0000 (15:12 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 14 Mar 2009 15:12:33 +0000 (15:12 +0000)
after clicking in a detached tool bar.
(xg_tool_bar_proxy_callback): Remove call to Fx_focus_frame.

src/ChangeLog
src/gtkutil.c

index 71c7fa01fbdf88f6e98a2f6ede0764dd08363cee..c980983d540e1d1bc9f76e944fc8094e5acade52 100644 (file)
@@ -1,3 +1,9 @@
+2009-03-14  Stephen Berman <stephen.berman@gmx.net>
+
+       * gtkutil.c (xg_tool_bar_callback): Set focus back to the frame
+       after clicking in a detached tool bar.
+       (xg_tool_bar_proxy_callback): Remove call to Fx_focus_frame.
+
 2009-03-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * fontset.c (fontset_from_font, Ffontset_info): YAILOM (Yet another
index 39781cfd56f5407e861e3f846c0b13f21dadfddd..8e3e24b6225f531144c2eb97bb7f6e3ec9718d68 100644 (file)
@@ -3457,10 +3457,14 @@ xg_tool_bar_callback (w, client_data)
   event.frame_or_window = frame;
   event.arg = key;
   /* Convert between the modifier bits GDK uses and the modifier bits
-     Emacs uses.  This assumes GDK an X masks are the same, which they are when
+     Emacs uses.  This assumes GDK and X masks are the same, which they are when
      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,11 +3484,6 @@ xg_tool_bar_proxy_callback (w, client_data)
   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,