X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/667383058ff503073f9e094ab3c88280748857ef..454e2fb9b928cb5d0f09db4e4334570419eb56b3:/src/window.c?ds=sidebyside
diff --git a/src/window.c b/src/window.c
index d8a6976e09..ecbe5fa536 100644
--- a/src/window.c
+++ b/src/window.c
@@ -20,8 +20,6 @@ along with GNU Emacs. If not, see . */
#include
-#define WINDOW_INLINE EXTERN_INLINE
-
#include
#include "lisp.h"
@@ -947,7 +945,7 @@ calc_absolute_offset (struct window *w, int *add_x, int *add_y)
#endif
#ifdef FRAME_TOOLBAR_TOP_HEIGHT
*add_y += FRAME_TOOLBAR_TOP_HEIGHT (f);
-#elif FRAME_TOOLBAR_HEIGHT
+#elif defined (FRAME_TOOLBAR_HEIGHT)
*add_y += FRAME_TOOLBAR_HEIGHT (f);
#endif
#ifdef FRAME_NS_TITLEBAR_HEIGHT
@@ -1379,6 +1377,7 @@ window_from_coordinates (struct frame *f, int x, int y,
cw.window = &window, cw.x = x, cw.y = y; cw.part = part;
foreach_window (f, check_window_containing, &cw);
+#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
/* If not found above, see if it's in the tool bar window, if a tool
bar exists. */
if (NILP (window)
@@ -1391,6 +1390,7 @@ window_from_coordinates (struct frame *f, int x, int y,
*part = ON_TEXT;
window = f->tool_bar_window;
}
+#endif
return window;
}
@@ -2008,8 +2008,10 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag)
memset (&n->cursor, 0, sizeof (n->cursor));
memset (&n->phys_cursor, 0, sizeof (n->phys_cursor));
n->last_cursor_vpos = 0;
- n->phys_cursor_type = -1;
+#ifdef HAVE_WINDOW_SYSTEM
+ n->phys_cursor_type = NO_CURSOR;
n->phys_cursor_width = -1;
+#endif
n->must_be_updated_p = 0;
n->pseudo_window_p = 0;
n->window_end_vpos = 0;
@@ -2945,7 +2947,7 @@ window-start value is reasonable when this function is called. */)
}
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
run_window_configuration_change_hook (f);
@@ -3419,8 +3421,11 @@ make_window (void)
non-Lisp data, so do it only for slots which should not be zero. */
w->nrows_scale_factor = w->ncols_scale_factor = 1;
w->left_fringe_width = w->right_fringe_width = -1;
- w->phys_cursor_type = -1;
+ w->mode_line_height = w->header_line_height = -1;
+#ifdef HAVE_WINDOW_SYSTEM
+ w->phys_cursor_type = NO_CURSOR;
w->phys_cursor_width = -1;
+#endif
w->scroll_bar_width = -1;
w->column_number_displayed = -1;
@@ -3644,7 +3649,7 @@ be applied on the Elisp level. */)
windows_or_buffers_changed++;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
run_window_configuration_change_hook (f);
@@ -3914,7 +3919,7 @@ set correctly. See the code of `split-window' for how this is done. */)
block_input ();
window_resize_apply (p, horflag);
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
/* Set buffer of NEW to buffer of reference window. Don't run
any hooks. */
set_window_buffer (new, r->contents, 0, 1);
@@ -4043,7 +4048,7 @@ Signal an error when WINDOW is the only window on its frame. */)
recombine_windows (sibling);
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f)))
/* We deleted the frame's selected window. */
@@ -4130,7 +4135,7 @@ grow_mini_window (struct window *w, int delta)
w->total_lines -= XINT (value);
/* Enforce full redisplay. FIXME: make it more selective. */
windows_or_buffers_changed++;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
}
}
@@ -4164,7 +4169,7 @@ shrink_mini_window (struct window *w)
w->total_lines = 1;
/* Enforce full redisplay. FIXME: make it more selective. */
windows_or_buffers_changed++;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
}
/* If the above failed for whatever strange reason we must make a
@@ -4205,7 +4210,7 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
windows_or_buffers_changed++;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
run_window_configuration_change_hook (f);
@@ -4476,7 +4481,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
visible. */
w->vscroll = (it.last_visible_y
- it.current_y + it.max_ascent + it.max_descent);
- adjust_glyphs (it.f);
+ adjust_frame_glyphs (it.f);
}
else
{
@@ -5111,9 +5116,9 @@ and redisplay normally--don't erase and redraw the frame. */)
/* Invalidate pixel data calculated for all compositions. */
for (i = 0; i < n_compositions; i++)
composition_table[i]->font = NULL;
-
+#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
WINDOW_XFRAME (w)->minimize_tool_bar_window_p = 1;
-
+#endif
Fredraw_frame (WINDOW_FRAME (w));
SET_FRAME_GARBAGED (WINDOW_XFRAME (w));
}
@@ -5400,7 +5405,7 @@ struct saved_window
};
#define SAVED_WINDOW_N(swv,n) \
- ((struct saved_window *) (XVECTOR ((swv)->contents[(n)])))
+ ((struct saved_window *) (XVECTOR ((swv)->u.contents[(n)])))
DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_p, 1, 1, 0,
doc: /* Return t if OBJECT is a window-configuration object. */)
@@ -5535,17 +5540,25 @@ the return value is nil. Otherwise the value is t. */)
|| data->frame_cols != previous_frame_cols)
change_frame_size (f, data->frame_lines,
data->frame_cols, 0, 0, 0);
-#if defined (HAVE_WINDOW_SYSTEM) || defined (MSDOS)
+#ifdef HAVE_MENUS
if (data->frame_menu_bar_lines
!= previous_frame_menu_bar_lines)
- x_set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
- make_number (0));
+ {
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
+ x_set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
+ make_number (0));
+ else /* TTY or MSDOS */
+#endif
+ set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
+ make_number (0));
+ }
+#endif
#ifdef HAVE_WINDOW_SYSTEM
if (data->frame_tool_bar_lines
!= previous_frame_tool_bar_lines)
x_set_tool_bar_lines (f, make_number (data->frame_tool_bar_lines),
make_number (0));
-#endif
#endif
/* "Swap out" point from the selected window's buffer
@@ -5733,15 +5746,24 @@ the return value is nil. Otherwise the value is t. */)
|| previous_frame_cols != FRAME_COLS (f))
change_frame_size (f, previous_frame_lines, previous_frame_cols,
0, 0, 0);
-#if defined (HAVE_WINDOW_SYSTEM) || defined (MSDOS)
+#ifdef HAVE_MENUS
if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f))
- x_set_menu_bar_lines (f, make_number (previous_frame_menu_bar_lines),
- make_number (0));
+ {
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f))
+ x_set_menu_bar_lines (f,
+ make_number (previous_frame_menu_bar_lines),
+ make_number (0));
+ else /* TTY or MSDOS */
+#endif
+ set_menu_bar_lines (f, make_number (previous_frame_menu_bar_lines),
+ make_number (0));
+ }
+#endif
#ifdef HAVE_WINDOW_SYSTEM
if (previous_frame_tool_bar_lines != FRAME_TOOL_BAR_LINES (f))
x_set_tool_bar_lines (f, make_number (previous_frame_tool_bar_lines),
make_number (0));
-#endif
#endif
/* Now, free glyph matrices in windows that were not reused. */
@@ -5753,7 +5775,7 @@ the return value is nil. Otherwise the value is t. */)
++n;
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
/* Scan dead buffer windows. */
@@ -6082,7 +6104,7 @@ apply_window_adjustment (struct window *w)
clear_glyph_matrix (w->current_matrix);
w->window_end_valid = 0;
windows_or_buffers_changed++;
- adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
+ adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w)));
}
@@ -6348,7 +6370,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */)
/* Adjust glyph matrix of the frame if the virtual display
area becomes larger than before. */
if (w->vscroll < 0 && w->vscroll < old_dy)
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
/* Prevent redisplay shortcuts. */
XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
@@ -6504,7 +6526,6 @@ init_window_once (void)
Vterminal_frame = selected_frame;
minibuf_window = f->minibuffer_window;
selected_window = f->selected_window;
- last_nonminibuf_frame = f;
window_initialized = 1;
}