diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-01-09 09:36:10 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-01-09 09:36:10 -0800 |
commit | 35cf62d95cdcd5323dcea4a5385942c342ff1d9c (patch) | |
tree | 90358cbb033a126c4d48793a80fd804b7baaca24 /src/xfns.c | |
parent | 59815c02506eb39b61e672528ed03885749ba529 (diff) | |
parent | 7655cb66d86564e792b825f1a0e1a4de7d6e6db5 (diff) | |
download | emacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.tar.gz emacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.tar.bz2 emacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.zip |
Merge from trunk.
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; |