changeset 11220:dd1c883953a2

(x_window_to_frame): Skip non-X frames before testing dpyinfo. [USE_X_TOOLKIT] (x_any_window_to_frame, x_top_window_to_frame): Ditto.
author Karl Heuer <kwzh@gnu.org>
date Thu, 06 Apr 1995 18:51:54 +0000
parents e9702b711640
children 254a5316fc98
files src/xfns.c
diffstat 1 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Thu Apr 06 12:18:08 1995 +0000
+++ b/src/xfns.c	Thu Apr 06 18:51:54 1995 +0000
@@ -276,11 +276,9 @@
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
-      if (FRAME_X_DISPLAY_INFO (f) != dpyinfo)
+      if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
 	continue;
 #ifdef USE_X_TOOLKIT
-      if (f->display.nothing == 1) 
-	return 0;
       if ((f->display.x->edit_widget 
 	   && XtWindow (f->display.x->edit_widget) == wdesc)
           || f->display.x->icon_desc == wdesc)
@@ -313,10 +311,8 @@
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
-      if (FRAME_X_DISPLAY_INFO (f) != dpyinfo)
+      if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
 	continue;
-      if (f->display.nothing == 1) 
-	return 0;
       x = f->display.x;
       /* This frame matches if the window is any of its widgets.  */
       if (wdesc == XtWindow (x->widget) 
@@ -348,10 +344,8 @@
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
-      if (FRAME_X_DISPLAY_INFO (f) != dpyinfo)
+      if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
 	continue;
-      if (f->display.nothing == 1) 
-	return 0;
       x = f->display.x;
       /* This frame matches if the window is its topmost widget.  */
       if (wdesc == XtWindow (x->widget))