changeset 11537:9d4df3cf95b3

(x_get_focus_frame): New arg FRAME. Callers changed. (Funfocus_frame): Unfocus on selected_frame's display.
author Karl Heuer <kwzh@gnu.org>
date Mon, 24 Apr 1995 18:28:11 +0000
parents c4d3218acd7e
children d0bd2102adbc
files src/xfns.c
diffstat 1 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Mon Apr 24 18:27:33 1995 +0000
+++ b/src/xfns.c	Mon Apr 24 18:28:11 1995 +0000
@@ -2331,7 +2331,8 @@
   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 @@
   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 @@
   "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;
     }