summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-04-24 18:28:11 +0000
committerKarl Heuer <kwzh@gnu.org>1995-04-24 18:28:11 +0000
commit44101285dbd61bcbf703cc1dd3e41300da6f7b9e (patch)
treee8adeaf14b9d2c4ee6b917a5b48c6b1c2fba1e58 /src
parentaa3b43b2852d54d6dcbd8818de052e226b0c5b14 (diff)
downloademacs-44101285dbd61bcbf703cc1dd3e41300da6f7b9e.tar.gz
(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.c19
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)
BLOCK_INPUT;
{
- char *str = (STRINGP (f->name) ? XSTRING (f->name)->data : "emacs");
+ char *str
+ = (STRINGP (f->name) ? (char *)XSTRING (f->name)->data : "emacs");
f->namebuf = (char *) xrealloc (f->namebuf, strlen (str) + 1);
strcpy (f->namebuf, str);
}
@@ -2954,14 +2955,19 @@ This function is an internal primitive--use `make-frame' instead.")
return unbind_to (count, frame);
}
+/* FRAME is used only to get a handle on the X display. We don't pass the
+ display info directly because we're called from frame.c, which doesn't
+ know about that structure. */
Lisp_Object
-x_get_focus_frame ()
+x_get_focus_frame (frame)
+ struct frame *frame;
{
+ struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame);
Lisp_Object xfocus;
- if (! x_focus_frame)
+ if (! dpyinfo->x_focus_frame)
return Qnil;
- XSETFRAME (xfocus, x_focus_frame);
+ XSETFRAME (xfocus, dpyinfo->x_focus_frame);
return xfocus;
}
@@ -2987,10 +2993,11 @@ DEFUN ("unfocus-frame", Funfocus_frame, Sunfocus_frame, 0, 0, 0,
"If a frame has been focused, release it.")
()
{
- if (x_focus_frame)
+ struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame);
+ if (dpyinfo->x_focus_frame)
{
BLOCK_INPUT;
- x_unfocus_frame (x_focus_frame);
+ x_unfocus_frame (dpyinfo->x_focus_frame);
UNBLOCK_INPUT;
}