Lisp_Object Qmenu_bar_lines;
Lisp_Object Qwidth;
Lisp_Object Qx;
+Lisp_Object Qwin32;
Lisp_Object Qvisible;
Lisp_Object Qbuffer_predicate;
Lisp_Object Vterminal_frame;
+Lisp_Object Vdefault_frame_alist;
Lisp_Object Qmouse_leave_buffer_hook;
staticpro (&Qwidth);
Qx = intern ("x");
staticpro (&Qx);
+ Qwin32 = intern ("win32");
+ staticpro (&Qwin32);
Qvisible = intern ("visible");
staticpro (&Qvisible);
Qbuffer_predicate = intern ("buffer-predicate");
Qmouse_leave_buffer_hook = intern ("mouse-leave-buffer-hook");
staticpro (&Qmouse_leave_buffer_hook);
+
+ DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
+ "Alist of default values for frame creation.\n\
+These may be set in your init file, like this:\n\
+ (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1))\n\
+These override values given in window system configuration data,\n\
+ including X Windows' defaults database.\n\
+For values specific to the first Emacs frame, see `initial-frame-alist'.\n\
+For values specific to the separate minibuffer frame, see\n\
+ `minibuffer-frame-alist'.\n\
+The `menu-bar-lines' element of the list controls whether new frames\n\
+ have menu bars; `menu-bar-mode' works by altering this element.");
+ Vdefault_frame_alist = Qnil;
}
\f
static void
{
struct window *w = XWINDOW (window);
+ XSETFASTINT (w->last_modified, 0);
XSETFASTINT (w->top, XFASTINT (w->top) + n);
XSETFASTINT (w->height, XFASTINT (w->height) - n);
else
nlines = 0;
- FRAME_MENU_BAR_LINES (f) = nlines;
- set_menu_bar_lines_1 (f->root_window, nlines - olines);
+ if (nlines != olines)
+ {
+ windows_or_buffers_changed++;
+ FRAME_WINDOW_SIZES_CHANGED (f) = 1;
+ FRAME_MENU_BAR_LINES (f) = nlines;
+ set_menu_bar_lines_1 (f->root_window, nlines - olines);
+ }
}
\f
#ifdef MULTI_FRAME
Lisp_Object Vemacs_iconified;
Lisp_Object Vframe_list;
-Lisp_Object Vdefault_frame_alist;
extern Lisp_Object Vminibuffer_list;
extern Lisp_Object get_minibuffer ();
return Qt;
case output_x_window:
return Qx;
+ case output_win32:
+ return Qwin32;
/* The `pc' case is in the Fframep below. */
default:
abort ();
}
#else /* ! 0 */
/* Instead, apply it only to the frame we're pointing to. */
-#ifdef HAVE_X_WINDOWS
- if (track && FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (track && (FRAME_WINDOW_P (XFRAME (frame))))
{
Lisp_Object focus, xfocus;
/* Verify that the frame's window still exists
and we can still talk to it. And note any recent change
in visibility. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (XFRAME (this)))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (XFRAME (this)))
{
x_sync (XFRAME (this));
FRAME_SAMPLE_VISIBILITY (XFRAME (this));
|| FRAME_ICONIFIED_P (XFRAME (this))
/* Allow deleting the terminal frame when at least
one X frame exists! */
- || (FRAME_X_P (XFRAME (this)) && !FRAME_X_P (f)))
+ || (FRAME_WINDOW_P (XFRAME (this)) && !FRAME_WINDOW_P (f)))
count++;
}
return count > 1;
called the window-system-dependent frame destruction routine. */
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
x_destroy_window (f);
#endif
CHECK_NUMBER (y, 1);
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (XFRAME (frame)))
/* Warping the mouse will cause enternotify and focus events. */
x_set_mouse_position (XFRAME (frame), x, y);
#endif
CHECK_NUMBER (y, 1);
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (XFRAME (frame)))
/* Warping the mouse will cause enternotify and focus events. */
x_set_mouse_pixel_position (XFRAME (frame), x, y);
#endif
CHECK_LIVE_FRAME (frame, 0);
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (XFRAME (frame)))
{
FRAME_SAMPLE_VISIBILITY (XFRAME (frame));
x_make_frame_visible (XFRAME (frame));
}
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (XFRAME (frame)))
x_make_frame_invisible (XFRAME (frame));
#endif
}
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (XFRAME (frame)))
x_iconify_frame (XFRAME (frame));
#endif
XFRAME (frame)->focus_frame = focus_frame;
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
if (!NILP (focus_frame) && ! EQ (focus_frame, frame)
- && FRAME_X_P (XFRAME (focus_frame)))
+ && (FRAME_WINDOW_P (XFRAME (focus_frame))))
Ffocus_frame (focus_frame);
#endif
if (EQ (prop, Qbuffer_predicate))
f->buffer_predicate = val;
- if (! FRAME_X_P (f))
+ if (! FRAME_WINDOW_P (f))
if (EQ (prop, Qmenu_bar_lines))
set_menu_bar_lines (f, val, make_number (FRAME_MENU_BAR_LINES (f)));
store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
x_report_frame_params (f, &alist);
else
#endif
}
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
x_set_frame_parameters (f, alist);
else
#endif
f = XFRAME (frame);
}
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
return make_number (x_char_height (f));
else
#endif
f = XFRAME (frame);
}
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
return make_number (x_char_width (f));
else
#endif
f = XFRAME (frame);
}
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
return make_number (x_pixel_height (f));
else
#endif
f = XFRAME (frame);
}
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
return make_number (x_pixel_width (f));
else
#endif
}
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
{
if (XINT (rows) != f->height)
x_set_window_size (f, 1, f->width, XINT (rows));
}
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
{
if (XINT (cols) != f->width)
x_set_window_size (f, 1, XINT (cols), f->height);
f = XFRAME (frame);
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
{
if (XINT (rows) != f->height || XINT (cols) != f->width)
x_set_window_size (f, 1, XINT (cols), XINT (rows));
f = XFRAME (frame);
/* I think this should be done with a hook. */
-#ifdef HAVE_X_WINDOWS
- if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
x_set_offset (f, XINT (xoffset), XINT (yoffset), 1);
#endif
return Qt;
}
-\f
-/* Put minibuf on currently selected frame's minibuffer.
- We do this whenever the user starts a new minibuffer
- or when a minibuffer exits. */
-
-choose_minibuf_frame ()
-{
- if (selected_frame != 0
- && !EQ (minibuf_window, selected_frame->minibuffer_window))
- {
- /* I don't think that any frames may validly have a null minibuffer
- window anymore. */
- if (NILP (selected_frame->minibuffer_window))
- abort ();
-
- Fset_window_buffer (selected_frame->minibuffer_window,
- XWINDOW (minibuf_window)->buffer);
- minibuf_window = selected_frame->minibuffer_window;
- }
-}
\f
syms_of_frame ()
{
current set of frames, or where the minibuffer is currently being\n\
displayed.");
- DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
- "Alist of default values for frame creation.\n\
-These may be set in your init file, like this:\n\
- (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1))\n\
-These override values given in window system configuration data,\n\
- including X Windows' defaults database.\n\
-For values specific to the first Emacs frame, see `initial-frame-alist'.\n\
-For values specific to the separate minibuffer frame, see\n\
- `minibuffer-frame-alist'.\n\
-The `menu-bar-lines' element of the list controls whether new frames\n\
- have menu bars; `menu-bar-mode' works by altering this element.");
- Vdefault_frame_alist = Qnil;
-
defsubr (&Sactive_minibuffer_window);
defsubr (&Sframep);
defsubr (&Sframe_live_p);
Lisp_Object frame, alist;
{
Lisp_Object tail, elt, prop, val;
+ FRAME_PTR f;
+
+ if (NILP (frame))
+ f = selected_frame;
+ else
+ {
+ CHECK_LIVE_FRAME (frame, 0);
+ f = XFRAME (frame);
+ }
#ifdef MSDOS
if (FRAME_X_P (frame))
{
return Fcons (Fselected_frame (), Qnil);
}
-
+\f
syms_of_frame ()
{
syms_of_frame_1 ();