diff options
| author | Richard M. Stallman | 1995-05-09 04:47:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-05-09 04:47:52 +0000 |
| commit | 917ad15f0318e760e3f0b41ad0d3633c6ed1c703 (patch) | |
| tree | b6db613f3fe55d5828217ba318e2b7297f289583 /src | |
| parent | bc6c324f8fdf88b665d16ab02bcbf69794728cbb (diff) | |
| download | emacs-917ad15f0318e760e3f0b41ad0d3633c6ed1c703.tar.gz emacs-917ad15f0318e760e3f0b41ad0d3633c6ed1c703.zip | |
(Funfocus_frame): Check for live X frame.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c index 722c6791dc1..712dac5696b 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3024,12 +3024,16 @@ DEFUN ("unfocus-frame", Funfocus_frame, Sunfocus_frame, 0, 0, 0, | |||
| 3024 | "If a frame has been focused, release it.") | 3024 | "If a frame has been focused, release it.") |
| 3025 | () | 3025 | () |
| 3026 | { | 3026 | { |
| 3027 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame); | 3027 | if (FRAME_X_P (selected_frame)) |
| 3028 | if (dpyinfo->x_focus_frame) | ||
| 3029 | { | 3028 | { |
| 3030 | BLOCK_INPUT; | 3029 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame); |
| 3031 | x_unfocus_frame (dpyinfo->x_focus_frame); | 3030 | |
| 3032 | UNBLOCK_INPUT; | 3031 | if (dpyinfo->x_focus_frame) |
| 3032 | { | ||
| 3033 | BLOCK_INPUT; | ||
| 3034 | x_unfocus_frame (dpyinfo->x_focus_frame); | ||
| 3035 | UNBLOCK_INPUT; | ||
| 3036 | } | ||
| 3033 | } | 3037 | } |
| 3034 | 3038 | ||
| 3035 | return Qnil; | 3039 | return Qnil; |