|| dim.width != w->desired_matrix->matrix_w
|| dim.height != w->desired_matrix->matrix_h
|| (margin_glyphs_to_reserve (w, dim.width,
- w->right_margin_cols)
+ w->left_margin_cols)
!= w->desired_matrix->left_margin_glyphs)
|| (margin_glyphs_to_reserve (w, dim.width,
- w->left_margin_cols)
+ w->right_margin_cols)
!= w->desired_matrix->right_margin_glyphs))
*window_change_flags |= CHANGED_LEAF_MATRIX;
int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f);
int window_pixel_height = window_box_height (w) + abs (w->vscroll);
return (((window_pixel_height + ch_height - 1)
- / ch_height)
+ / ch_height) * w->nrows_scale_factor
/* One partially visible line at the top and
bottom of the window. */
+ 2
/* Compute number of glyphs needed in a glyph row. */
return (((window_pixel_width + ch_width - 1)
- / ch_width)
+ / ch_width) * w->ncols_scale_factor
/* 2 partially visible columns in the text area. */
+ 2
/* One partially visible column at the right
struct text_pos startp;
Lisp_Object string;
struct glyph_row *row;
+#ifdef HAVE_WINDOW_SYSTEM
+ struct image *img = 0;
+#endif
int x0, x1;
current_buffer = XBUFFER (w->buffer);
#ifdef HAVE_WINDOW_SYSTEM
if (it.what == IT_IMAGE)
{
- struct image *img;
if ((img = IMAGE_FROM_ID (it.f, it.image_id)) != NULL
&& !NILP (img->spec))
*object = img->spec;
if (it.hpos < row->used[TEXT_AREA])
{
struct glyph *glyph = row->glyphs[TEXT_AREA] + it.hpos;
- *width = glyph->pixel_width;
- *height = glyph->ascent + glyph->descent;
#ifdef HAVE_WINDOW_SYSTEM
- if (glyph->type == IMAGE_GLYPH)
- *dy -= row->ascent - glyph->ascent;
+ if (img)
+ {
+ *dy -= row->ascent - glyph->ascent;
+ *dx += glyph->slice.x;
+ *dy += glyph->slice.y;
+ /* Image slices positions are still relative to the entire image */
+ *width = img->width;
+ *height = img->height;
+ }
+ else
#endif
+ {
+ *width = glyph->pixel_width;
+ *height = glyph->ascent + glyph->descent;
+ }
}
else
{
if (img != NULL)
*object = img->spec;
y0 -= row->ascent - glyph->ascent;
+ x0 += glyph->slice.x;
+ y0 += glyph->slice.y;
}
#endif
}
#endif
int old_errno = errno;
+ signal (SIGWINCH, window_change_signal);
+ SIGNAL_THREAD_CHECK (signalnum);
+
get_frame_size (&width, &height);
/* The frame size change obviously applies to a termcap-controlled
}
}
- signal (SIGWINCH, window_change_signal);
errno = old_errno;
}
#endif /* SIGWINCH */
if (sec < 0 || (sec == 0 && usec == 0))
return Qnil;
- {
- Lisp_Object zero;
-
- XSETFASTINT (zero, 0);
- wait_reading_process_input (sec, usec, zero, 0);
- }
-
- /* We should always have wait_reading_process_input; we have a dummy
- implementation for systems which don't support subprocesses. */
-#if 0
- /* No wait_reading_process_input */
- immediate_quit = 1;
- QUIT;
-
-#ifdef VMS
- sys_sleep (sec);
-#else /* not VMS */
-/* The reason this is done this way
- (rather than defined (H_S) && defined (H_T))
- is because the VMS preprocessor doesn't grok `defined'. */
-#ifdef HAVE_SELECT
- EMACS_GET_TIME (end_time);
- EMACS_SET_SECS_USECS (timeout, sec, usec);
- EMACS_ADD_TIME (end_time, end_time, timeout);
-
- while (1)
- {
- EMACS_GET_TIME (timeout);
- EMACS_SUB_TIME (timeout, end_time, timeout);
- if (EMACS_TIME_NEG_P (timeout)
- || !select (1, 0, 0, 0, &timeout))
- break;
- }
-#else /* not HAVE_SELECT */
- sleep (sec);
-#endif /* HAVE_SELECT */
-#endif /* not VMS */
-
- immediate_quit = 0;
-#endif /* no subprocesses */
+ wait_reading_process_output (sec, usec, 0, 0, Qnil, NULL, 0);
return Qnil;
}
-/* This is just like wait_reading_process_input, except that
+/* This is just like wait_reading_process_output, except that
it does the redisplay.
It's also much like Fsit_for, except that it can be used for
sit_for (sec, usec, reading, display, initial_display)
int sec, usec, reading, display, initial_display;
{
- Lisp_Object read_kbd;
-
swallow_events (display);
if (detect_input_pending_run_timers (display) || !NILP (Vexecuting_macro))
gobble_input (0);
#endif
- XSETINT (read_kbd, reading ? -1 : 1);
- wait_reading_process_input (sec, usec, read_kbd, display);
+ wait_reading_process_output (sec, usec, reading ? -1 : 1, display,
+ Qnil, NULL, 0);
return detect_input_pending () ? Qnil : Qt;
}