mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 08:43:40 -07:00
(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.
This commit is contained in:
parent
e1960a184a
commit
21a6ce3ada
1 changed files with 3 additions and 9 deletions
12
src/xfns.c
12
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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue