* src/frame.h (x_focus_frame): New prototype.
* src/xfns.c (Fx_focus_frame): Remove.
(syms_of_xfns): Do not defsubr it.
(x_focus_frame): X implementation.
* src/nsfns.m (Fx_focus_frame): Remove.
(syms_of_nsfns): Do not defsubr it.
(x_focus_frame): NS implementation.
* src/w32term.c (Fx_focus_frame): Remove.
(x_focus_on_frame): Rename to...
(x_focus_frame): W32 implementation.
* src/w32term.h (x_focus_on_frame): Remove prototype.
* src/w32fns.c (Fx_focus_frame): Remove.
(syms_of_w32fns): Do not defsubr it.
* src/frame.c (Fx_focus_frame): Define here.
(syms_of_frame): Defsubr here.
* src/gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
* lisp/frame.el (x-focus-frame): Mark as declared in frame.c.
+2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * frame.el (x-focus-frame): Mark as declared in frame.c.
+
2013-09-13 Stefan Monnier <monnier@iro.umontreal.ca>
* ls-lisp.el: Use advice-add.
(nreverse frame-initial-geometry-arguments))
(cdr param-list))
-(declare-function x-focus-frame "xfns.c" (frame))
+(declare-function x-focus-frame "frame.c" (frame))
(defun select-frame-set-input-focus (frame &optional norecord)
"Select FRAME, raise it, and set input focus, if possible.
+2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Unify Fx_focus_frame between all ports.
+ * frame.h (x_focus_frame): New prototype.
+ * xfns.c (Fx_focus_frame): Remove.
+ (syms_of_xfns): Do not defsubr it.
+ (x_focus_frame): X implementation.
+ * nsfns.m (Fx_focus_frame): Remove.
+ (syms_of_nsfns): Do not defsubr it.
+ (x_focus_frame): NS implementation.
+ * w32term.c (Fx_focus_frame): Remove.
+ (x_focus_on_frame): Rename to...
+ (x_focus_frame): W32 implementation.
+ * w32term.h (x_focus_on_frame): Remove prototype.
+ * w32fns.c (Fx_focus_frame): Remove.
+ (syms_of_w32fns): Do not defsubr it.
+ * frame.c (Fx_focus_frame): Define here.
+ (syms_of_frame): Defsubr here.
+ * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
+
2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
return FRAME_FOCUS_FRAME (decode_live_frame (frame));
}
+DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
+ doc: /* Set the input focus to FRAME.
+FRAME nil means use the selected frame. */)
+ (Lisp_Object frame)
+{
+ x_focus_frame (decode_window_system_frame (frame));
+ return Qnil;
+}
\f
/* Return the value of frame parameter PROP in frame FRAME. */
defsubr (&Svisible_frame_list);
defsubr (&Sraise_frame);
defsubr (&Slower_frame);
+ defsubr (&Sx_focus_frame);
defsubr (&Sredirect_frame_focus);
defsubr (&Sframe_focus);
defsubr (&Sframe_parameters);
extern void x_query_colors (struct frame *f, XColor *, int);
extern void x_query_color (struct frame *f, XColor *);
+extern void x_focus_frame (struct frame *);
#endif /* HAVE_WINDOW_SYSTEM */
\f
event.modifiers = x_x_to_emacs_modifiers (FRAME_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);
+ /* Return focus to the frame after we have clicked on a detached
+ tool bar button. */
+ x_focus_frame (f);
}
/* Callback function invoked when a tool bar item is pressed in a detached
return unbind_to (count, frame);
}
-
-DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
- doc: /* Set the input focus to FRAME.
-FRAME nil means use the selected frame. */)
- (Lisp_Object frame)
+void
+x_focus_frame (struct frame *f)
{
- struct frame *f = decode_window_system_frame (frame);
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (dpyinfo->x_focus_frame != f)
[[view window] makeKeyAndOrderFront: view];
unblock_input ();
}
-
- return Qnil;
}
defsubr (&Sns_list_services);
defsubr (&Sns_perform_service);
defsubr (&Sns_convert_utf8_nfd_to_nfc);
- defsubr (&Sx_focus_frame);
defsubr (&Sns_popup_font_panel);
defsubr (&Sns_popup_color_panel);
return xfocus;
}
-DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
- doc: /* Give FRAME input focus, raising to foreground if necessary. */)
- (Lisp_Object frame)
-{
- x_focus_on_frame (decode_window_system_frame (frame));
- return Qnil;
-}
-
-\f
DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
doc: /* Internal function called by `color-defined-p', which see.
\(Note that the Nextstep version of this function ignores FRAME.) */)
defsubr (&Sx_close_connection);
defsubr (&Sx_display_list);
defsubr (&Sx_synchronize);
- defsubr (&Sx_focus_frame);
/* W32 specific functions */
/* focus shifting, raising and lowering. */
void
-x_focus_on_frame (struct frame *f)
+x_focus_frame (struct frame *f)
{
struct w32_display_info *dpyinfo = &one_w32_display_info;
Lisp_Object, Lisp_Object,
Lisp_Object, Lisp_Object);
-extern void x_focus_on_frame (struct frame *f);
-
/* also defined in xterm.h XXX: factor out to common header */
extern struct w32_display_info *w32_term_init (Lisp_Object,
policy. But I think it's okay to use when it's clearly done
following a user-command. */
-DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
- doc: /* Set the input focus to FRAME.
-FRAME nil means use the selected frame. */)
- (Lisp_Object frame)
+void
+x_focus_frame (struct frame *f)
{
- struct frame *f = decode_window_system_frame (frame);
Display *dpy = FRAME_X_DISPLAY (f);
block_input ();
x_uncatch_errors ();
unblock_input ();
-
- return Qnil;
}
\f
defsubr (&Sx_close_connection);
defsubr (&Sx_display_list);
defsubr (&Sx_synchronize);
- defsubr (&Sx_focus_frame);
defsubr (&Sx_backspace_delete_keys_p);
defsubr (&Sx_show_tip);