From: Karl Heuer Date: Thu, 6 Apr 1995 18:51:54 +0000 (+0000) Subject: (x_window_to_frame): Skip non-X frames before testing dpyinfo. X-Git-Tag: emacs-19.34~4638 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=21a6ce3ada5247361ce1f4d3c3d64c10065b3e1e;p=emacs.git (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. --- diff --git a/src/xfns.c b/src/xfns.c index 88310ed8cc0..6b323e580b3 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -276,11 +276,9 @@ x_window_to_frame (dpyinfo, wdesc) 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 @@ x_any_window_to_frame (dpyinfo, wdesc) 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 @@ x_top_window_to_frame (dpyinfo, wdesc) 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))