Mercurial > emacs
comparison src/xfns.c @ 11611:bf53e9945a3c
(x_non_menubar_window_to_frame): New function.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 29 Apr 1995 04:19:13 +0000 |
parents | 9d4df3cf95b3 |
children | b0cb8129be58 |
comparison
equal
deleted
inserted
replaced
11610:07eae46b8b4e | 11611:bf53e9945a3c |
---|---|
319 || wdesc == XtWindow (x->column_widget) | 319 || wdesc == XtWindow (x->column_widget) |
320 || wdesc == XtWindow (x->edit_widget)) | 320 || wdesc == XtWindow (x->edit_widget)) |
321 return f; | 321 return f; |
322 /* Match if the window is this frame's menubar. */ | 322 /* Match if the window is this frame's menubar. */ |
323 if (lw_window_is_in_menubar (wdesc, x->menubar_widget)) | 323 if (lw_window_is_in_menubar (wdesc, x->menubar_widget)) |
324 return f; | |
325 } | |
326 return 0; | |
327 } | |
328 | |
329 /* Likewise, but exclude the menu bar widget. */ | |
330 | |
331 struct frame * | |
332 x_non_menubar_window_to_frame (dpyinfo, wdesc) | |
333 struct x_display_info *dpyinfo; | |
334 int wdesc; | |
335 { | |
336 Lisp_Object tail, frame; | |
337 struct frame *f; | |
338 struct x_display *x; | |
339 | |
340 for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr) | |
341 { | |
342 frame = XCONS (tail)->car; | |
343 if (!GC_FRAMEP (frame)) | |
344 continue; | |
345 f = XFRAME (frame); | |
346 if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo) | |
347 continue; | |
348 x = f->display.x; | |
349 /* This frame matches if the window is any of its widgets. */ | |
350 if (wdesc == XtWindow (x->widget) | |
351 || wdesc == XtWindow (x->column_widget) | |
352 || wdesc == XtWindow (x->edit_widget)) | |
324 return f; | 353 return f; |
325 } | 354 } |
326 return 0; | 355 return 0; |
327 } | 356 } |
328 | 357 |