mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-02 11:21:42 +00:00
* src/xwidget.c (x_draw_xwidget_glyph_string): More clipping fixes.
This commit is contained in:
parent
24b87a1d4a
commit
567ab529f3
@ -580,20 +580,14 @@ x_draw_xwidget_glyph_string (struct glyph_string *s)
|
|||||||
|
|
||||||
int text_area_x, text_area_y, text_area_width, text_area_height;
|
int text_area_x, text_area_y, text_area_width, text_area_height;
|
||||||
|
|
||||||
window_box (s->w,
|
window_box (s->w, TEXT_AREA, &text_area_x, &text_area_y,
|
||||||
ANY_AREA,
|
&text_area_width, &text_area_height);
|
||||||
&text_area_x,
|
clip_left = max (0, text_area_x - x);
|
||||||
&text_area_y,
|
clip_right = max (clip_left,
|
||||||
&text_area_width,
|
min (xww->width, text_area_x + text_area_width - x));
|
||||||
&text_area_height);
|
clip_top = max (0, text_area_y - y);
|
||||||
clip_right = min (xww->width,
|
clip_bottom = max (clip_top,
|
||||||
text_area_width);
|
min (xww->height, text_area_y + text_area_height - y));
|
||||||
clip_left = max (0,
|
|
||||||
text_area_x);
|
|
||||||
|
|
||||||
clip_bottom = min (xww->height,
|
|
||||||
text_area_height);
|
|
||||||
clip_top = max (0, text_area_y);
|
|
||||||
|
|
||||||
/* We are concerned with movement of the onscreen area. The area
|
/* We are concerned with movement of the onscreen area. The area
|
||||||
might sit still when the widget actually moves. This happens
|
might sit still when the widget actually moves. This happens
|
||||||
@ -622,8 +616,8 @@ x_draw_xwidget_glyph_string (struct glyph_string *s)
|
|||||||
|| xv->clip_bottom != clip_bottom
|
|| xv->clip_bottom != clip_bottom
|
||||||
|| xv->clip_top != clip_top || xv->clip_left != clip_left)
|
|| xv->clip_top != clip_top || xv->clip_left != clip_left)
|
||||||
{
|
{
|
||||||
gtk_widget_set_size_request (xv->widgetwindow, clip_right + clip_left,
|
gtk_widget_set_size_request (xv->widgetwindow, clip_right - clip_left,
|
||||||
clip_bottom + clip_top);
|
clip_bottom - clip_top);
|
||||||
gtk_fixed_move (GTK_FIXED (xv->widgetwindow), xv->widget, -clip_left,
|
gtk_fixed_move (GTK_FIXED (xv->widgetwindow), xv->widget, -clip_left,
|
||||||
-clip_top);
|
-clip_top);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user