diff options
| author | Karl Heuer | 1995-04-24 18:28:11 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-04-24 18:28:11 +0000 |
| commit | 0d17d2828c7e9e5c737f5d15581d2d59b39dc57c (patch) | |
| tree | 13d1f36c120f74995e96c1c4d67cc99dcdb9a0ce /src | |
| parent | 0f9419350b4bfbe8d2a291a277b51fc157066978 (diff) | |
| download | emacs-0d17d2828c7e9e5c737f5d15581d2d59b39dc57c.tar.gz emacs-0d17d2828c7e9e5c737f5d15581d2d59b39dc57c.zip | |
(x_get_focus_frame): New arg FRAME. Callers changed.
(Funfocus_frame): Unfocus on selected_frame's display.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/xfns.c b/src/xfns.c index 28208a874f8..bc28b7e8d73 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2331,7 +2331,8 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2331 | BLOCK_INPUT; | 2331 | BLOCK_INPUT; |
| 2332 | 2332 | ||
| 2333 | { | 2333 | { |
| 2334 | char *str = (STRINGP (f->name) ? XSTRING (f->name)->data : "emacs"); | 2334 | char *str |
| 2335 | = (STRINGP (f->name) ? (char *)XSTRING (f->name)->data : "emacs"); | ||
| 2335 | f->namebuf = (char *) xrealloc (f->namebuf, strlen (str) + 1); | 2336 | f->namebuf = (char *) xrealloc (f->namebuf, strlen (str) + 1); |
| 2336 | strcpy (f->namebuf, str); | 2337 | strcpy (f->namebuf, str); |
| 2337 | } | 2338 | } |
| @@ -2954,14 +2955,19 @@ This function is an internal primitive--use `make-frame' instead.") | |||
| 2954 | return unbind_to (count, frame); | 2955 | return unbind_to (count, frame); |
| 2955 | } | 2956 | } |
| 2956 | 2957 | ||
| 2958 | /* FRAME is used only to get a handle on the X display. We don't pass the | ||
| 2959 | display info directly because we're called from frame.c, which doesn't | ||
| 2960 | know about that structure. */ | ||
| 2957 | Lisp_Object | 2961 | Lisp_Object |
| 2958 | x_get_focus_frame () | 2962 | x_get_focus_frame (frame) |
| 2963 | struct frame *frame; | ||
| 2959 | { | 2964 | { |
| 2965 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame); | ||
| 2960 | Lisp_Object xfocus; | 2966 | Lisp_Object xfocus; |
| 2961 | if (! x_focus_frame) | 2967 | if (! dpyinfo->x_focus_frame) |
| 2962 | return Qnil; | 2968 | return Qnil; |
| 2963 | 2969 | ||
| 2964 | XSETFRAME (xfocus, x_focus_frame); | 2970 | XSETFRAME (xfocus, dpyinfo->x_focus_frame); |
| 2965 | return xfocus; | 2971 | return xfocus; |
| 2966 | } | 2972 | } |
| 2967 | 2973 | ||
| @@ -2987,10 +2993,11 @@ DEFUN ("unfocus-frame", Funfocus_frame, Sunfocus_frame, 0, 0, 0, | |||
| 2987 | "If a frame has been focused, release it.") | 2993 | "If a frame has been focused, release it.") |
| 2988 | () | 2994 | () |
| 2989 | { | 2995 | { |
| 2990 | if (x_focus_frame) | 2996 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame); |
| 2997 | if (dpyinfo->x_focus_frame) | ||
| 2991 | { | 2998 | { |
| 2992 | BLOCK_INPUT; | 2999 | BLOCK_INPUT; |
| 2993 | x_unfocus_frame (x_focus_frame); | 3000 | x_unfocus_frame (dpyinfo->x_focus_frame); |
| 2994 | UNBLOCK_INPUT; | 3001 | UNBLOCK_INPUT; |
| 2995 | } | 3002 | } |
| 2996 | 3003 | ||