[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About x_draw_xwidget_glyph_string
From: |
Eli Zaretskii |
Subject: |
Re: About x_draw_xwidget_glyph_string |
Date: |
Mon, 25 Jan 2016 17:46:00 +0200 |
> Date: Mon, 25 Jan 2016 11:07:16 +0900
> From: YAMAMOTO Mitsuharu <address@hidden>
>
> 2. Comment on clipping.
>
> 578 /* Calculate clipping, which is used for all manner of
> onscreen
> 579 xwidget views. Each widget border can get clipped by
> other emacs
> 580 objects so there are four clipping variables. */
> 581 clip_right =
> 582 min (xww->width,
> 583 WINDOW_RIGHT_EDGE_X (s->w) - x -
> 584 WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w) -
> 585 WINDOW_RIGHT_FRINGE_WIDTH (s->w));
> 586 clip_left =
> 587 max (0,
> 588 WINDOW_LEFT_EDGE_X (s->w) - x +
> 589 WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (s->w) +
> 590 WINDOW_LEFT_FRINGE_WIDTH (s->w));
> 591
> 592 clip_bottom =
> 593 min (xww->height,
> 594 WINDOW_BOTTOM_EDGE_Y (s->w) - WINDOW_MODE_LINE_HEIGHT
> (s->w) - y);
> 595 clip_top = max (0, WINDOW_TOP_EDGE_Y (s->w) - y);
>
> I think the calculation of clipping should use the function window_box
> rather than manual calculation with various window macros. Otherwise,
> xwidget views will cover horizontal scroll bars, for example.
I agree.
Thanks.