aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1995-04-06 18:51:54 +0000
committerKarl Heuer <[email protected]>1995-04-06 18:51:54 +0000
commit21a6ce3ada5247361ce1f4d3c3d64c10065b3e1e (patch)
treea68eae12959cb5187f5409bf50512c6a862e808a /src
parente1960a184acd8fd5e63066a92af72e8bae88a799 (diff)
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 88310ed8cc..6b323e580b 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))