diff options
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c index 642b3602833..b0cef7221f8 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1,6 +1,6 @@ /* Functions for the X window system. -Copyright (C) 1989, 1992-2011 Free Software Foundation, Inc. +Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3519,9 +3519,21 @@ FRAME nil means use the selected frame. */) BLOCK_INPUT; x_catch_errors (dpy); - XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - RevertToParent, CurrentTime); - x_ewmh_activate_frame (f); + + if (FRAME_X_EMBEDDED_P (f)) + { + /* For Xembedded frames, normally the embedder forwards key + events. See XEmbed Protocol Specification at + http://freedesktop.org/wiki/Specifications/xembed-spec */ + xembed_request_focus (f); + } + else + { + XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + RevertToParent, CurrentTime); + x_ewmh_activate_frame (f); + } + x_uncatch_errors (); UNBLOCK_INPUT; |