/* Use set_window_buffer, not Fset_window_buffer, and don't let
hooks be run by it. The reason is that the whole frame/window
- arrangement is not yet fully intialized at this point. Windows
+ arrangement is not yet fully initialized at this point. Windows
don't have the right size, glyph matrices aren't initialized
etc. Running Lisp functions at this point surely ends in a
SEGV. */
return 1;
}
-DEFUN ("other-visible-frames-p", Fother_visible_frames_p, Sother_visible_frames_p, 0, 1, 0,
- doc: /* Return t if there are other visible frames beside FRAME.
-FRAME defaults to the selected frame. */)
- (Lisp_Object frame)
-{
- if (NILP (frame))
- frame = selected_frame;
- CHECK_LIVE_FRAME (frame);
- return other_visible_frames (XFRAME (frame)) ? Qt : Qnil;
-}
-
/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME
unconditionally. x_connection_closed and delete_terminal use
this. Any other value of FORCE implements the semantics
else
{
#ifdef HAVE_X_WINDOWS
- /* Also, save clipboard to the the clipboard manager. */
+ /* Also, save clipboard to the clipboard manager. */
x_clipboard_manager_save_frame (frame);
#endif
/* Mark all the windows that used to be on FRAME as deleted, and then
remove the reference to them. */
- delete_all_subwindows (f->root_window);
+ delete_all_child_windows (f->root_window);
f->root_window = Qnil;
Vframe_list = Fdelq (frame, Vframe_list);
/* If needed, delete the terminal that this frame was on.
(This must be done after the frame is killed.) */
terminal->reference_count--;
+#ifdef USE_GTK
+ /* FIXME: Deleting the terminal crashes emacs because of a GTK
+ bug.
+ http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg00363.html */
+ if (terminal->reference_count == 0 && terminal->type == output_x_window)
+ terminal->reference_count = 1;
+#endif /* USE_GTK */
if (terminal->reference_count == 0)
{
Lisp_Object tmp;
}
/* Update the display_time slot of the buffers shown in WINDOW
- and all its descendents. */
+ and all its descendants. */
static void
make_frame_visible_1 (Lisp_Object window)
of the result depends on the window-system and toolkit in use:
In the Gtk+ version of Emacs, it includes only any window (including
-the minibuffer or eacho area), mode line, and header line. It does not
+the minibuffer or echo area), mode line, and header line. It does not
include the tool bar or menu bar.
With the Motif or Lucid toolkits, it also includes the tool bar (but
for non-toolkit scroll bar.
ruler-mode.el depends on this. */
: Qnil));
- w = FRAME_X_WINDOW (f);
+ /* FRAME_X_WINDOW is not guaranteed to return an integer. E.g., on
+ MS-Windows it returns a value whose type is HANDLE, which is
+ actually a pointer. Explicit casting avoids compiler
+ warnings. */
+ w = (unsigned long) FRAME_X_WINDOW (f);
sprintf (buf, "%lu", w);
store_in_alist (alistptr, Qwindow_id,
build_string (buf));
if (FRAME_X_OUTPUT (f)->widget)
#endif
{
- w = FRAME_OUTER_WINDOW (f);
+ w = (unsigned long) FRAME_OUTER_WINDOW (f);
sprintf (buf, "%lu", w);
}
store_in_alist (alistptr, Qouter_window_id,
DEFVAR_LISP ("default-frame-scroll-bars", Vdefault_frame_scroll_bars,
doc: /* Default position of scroll bars on this window-system. */);
#ifdef HAVE_WINDOW_SYSTEM
-#if defined(HAVE_NTGUI) || defined(NS_IMPL_COCOA) || (defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS))
+#if defined (HAVE_NTGUI) || defined (NS_IMPL_COCOA) || (defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS))
/* MS-Windows, Mac OS X, and GTK have scroll bars on the right by
default. */
Vdefault_frame_scroll_bars = Qright;
defsubr (&Sframe_list);
defsubr (&Snext_frame);
defsubr (&Sprevious_frame);
- defsubr (&Sother_visible_frames_p);
defsubr (&Sdelete_frame);
defsubr (&Smouse_position);
defsubr (&Smouse_pixel_position);