Mercurial > hg > xemacs-beta
comparison src/frame-x.c @ 209:41ff10fd062f r20-4b3
Import from CVS: tag r20-4b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:04:58 +0200 |
parents | e45d5e7c476e |
children | 78478c60bfcd |
comparison
equal
deleted
inserted
replaced
208:f427b8ec4379 | 209:41ff10fd062f |
---|---|
2509 /* Destroy the X window of frame S. */ | 2509 /* Destroy the X window of frame S. */ |
2510 static void | 2510 static void |
2511 x_delete_frame (struct frame *f) | 2511 x_delete_frame (struct frame *f) |
2512 { | 2512 { |
2513 Widget w = FRAME_X_SHELL_WIDGET (f); | 2513 Widget w = FRAME_X_SHELL_WIDGET (f); |
2514 Lisp_Object popup, frame; | 2514 Lisp_Object frame; |
2515 | 2515 |
2516 #ifndef HAVE_SESSION | 2516 #ifndef HAVE_SESSION |
2517 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) | 2517 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) |
2518 x_wm_maybe_move_wm_command (f); | 2518 x_wm_maybe_move_wm_command (f); |
2519 #endif /* HAVE_SESSION */ | 2519 #endif /* HAVE_SESSION */ |
2520 | 2520 |
2521 /* Frames with the popup property are using other frames as their | |
2522 widget parent. Deleting them are their parent has already been | |
2523 deleted can lead to crashes. */ | |
2524 XSETFRAME (frame, f); | 2521 XSETFRAME (frame, f); |
2525 popup = Fframe_property (frame, Qpopup, Qnil); | |
2526 if (!NILP (popup)) | |
2527 { | |
2528 /* If popup isn't nil then it means the frame has that property | |
2529 and the value is supposed to be the parent frame. The FRAMEP | |
2530 check is to safeguard against it not being a frame. */ | |
2531 if (!FRAMEP (popup) || !FRAME_LIVE_P (XFRAME (popup))) | |
2532 popup = Qt; | |
2533 else | |
2534 popup = Qnil; | |
2535 } | |
2536 | 2522 |
2537 #ifdef EXTERNAL_WIDGET | 2523 #ifdef EXTERNAL_WIDGET |
2538 { | 2524 { |
2539 Display *dpy = XtDisplay (w); | 2525 Display *dpy = XtDisplay (w); |
2540 expect_x_error (dpy); | 2526 expect_x_error (dpy); |
2546 if (NILP (popup)) | 2532 if (NILP (popup)) |
2547 XtDestroyWidget (w); | 2533 XtDestroyWidget (w); |
2548 x_error_occurred_p (dpy); | 2534 x_error_occurred_p (dpy); |
2549 } | 2535 } |
2550 #else | 2536 #else |
2551 if (NILP (popup)) | 2537 XtDestroyWidget (w); |
2552 XtDestroyWidget (w); | |
2553 #endif /* EXTERNAL_WIDGET */ | 2538 #endif /* EXTERNAL_WIDGET */ |
2554 | 2539 |
2555 if (FRAME_X_GEOM_FREE_ME_PLEASE (f)) | 2540 if (FRAME_X_GEOM_FREE_ME_PLEASE (f)) |
2556 xfree (FRAME_X_GEOM_FREE_ME_PLEASE (f)); | 2541 xfree (FRAME_X_GEOM_FREE_ME_PLEASE (f)); |
2557 xfree (f->frame_data); | 2542 xfree (f->frame_data); |