return ON_NOTHING;
/* On vertical window divider (which prevails horizontal
- dividers) ? */
+ dividers)? */
if (!WINDOW_RIGHTMOST_P (w)
&& WINDOW_RIGHT_DIVIDER_WIDTH (w)
&& x >= right_x - WINDOW_RIGHT_DIVIDER_WIDTH (w)
terminals, the vertical line's x coordinate is right_x. */
else if (!w->pseudo_window_p
&& !WINDOW_RIGHTMOST_P (w)
- /* Why check ux if we are not the rightmost window ? Also
- shouldn't a pseudo window always be rightmost ? */
+ /* Why check ux if we are not the rightmost window? Also
+ shouldn't a pseudo window always be rightmost? */
&& x > right_x - ux)
return ON_VERTICAL_BORDER;
(Lisp_Object window, Lisp_Object size, Lisp_Object add)
{
struct window *w = decode_valid_window (window);
+ EMACS_INT size_max = (min (INT_MAX, MOST_POSITIVE_FIXNUM)
+ - (NILP (add) ? 0 : XINT (w->new_pixel)));
- CHECK_NUMBER (size);
+ CHECK_RANGED_INTEGER (size, 0, size_max);
if (NILP (add))
wset_new_pixel (w, size);
else
if (pixelwise)
{
- pixel_height = -XINT (height);
+ pixel_height = min (-XINT (height), INT_MAX - w->pixel_height);
line_height = pixel_height / FRAME_LINE_HEIGHT (f);
}
else
{
- line_height = -XINT (height);
+ line_height = min (-XINT (height),
+ ((INT_MAX - w->pixel_height)
+ / FRAME_LINE_HEIGHT (f)));
pixel_height = line_height * FRAME_LINE_HEIGHT (f);
}
From `frame-cols' down, the fields are ignored by the GC. */
/* We should be able to do without the following two. */
int frame_cols, frame_lines;
- /* These two should get eventually replaced by their pixelized
+ /* These two should get eventually replaced by their pixel
counterparts. */
int frame_menu_bar_lines, frame_tool_bar_lines;
int frame_text_width, frame_text_height;
- /* These are currently unused. We need them as soon as we pixelize
- them. */
+ /* These are currently unused. We need them as soon as we convert
+ to pixels. */
int frame_menu_bar_height, frame_tool_bar_height;
};