Commit 21a6ce3a authored by Karl Heuer's avatar Karl Heuer
Browse files

(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.
parent e1960a18
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment