unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 4df7bb9c01 2/2: Fix display of stretch glyphs when hscrolled on PGTK
       [not found] <mailman.7333.1646390109.1056.emacs-diffs@gnu.org>
@ 2022-03-04 12:06 ` Eli Zaretskii
  2022-03-04 12:37   ` Po Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2022-03-04 12:06 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

The resulting code after this changeset seems to test some conditions
twice:

>        if (x < text_left_x && !s->row->mode_line_p)
>  	{
> -	  int left_x = WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (s->w);
> -	  int right_x = text_left_x;
> +	  int background_width = s->background_width;
> +	  int x = s->x, text_left_x = window_box_left (s->w, TEXT_AREA);
>  
> -	  if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w))
> -	    left_x += WINDOW_LEFT_FRINGE_WIDTH (s->w);
> -	  else
> -	    right_x -= WINDOW_LEFT_FRINGE_WIDTH (s->w);
> -
> -	  /* Adjust X and BACKGROUND_WIDTH to fit inside the space
> -	     between LEFT_X and RIGHT_X.  */
> -	  if (x < left_x)
> +	  /* Don't draw into left fringe or scrollbar area except for
> +	     header line and mode line.  */
> +	  if (s->area == TEXT_AREA
> +	      && x < text_left_x && !s->row->mode_line_p)
>  	    {

The 'if (x < text_left_x && !s->row->mode_line_p)' condition is tested
again inside the block conditioned on that.  Is that necessary?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: master 4df7bb9c01 2/2: Fix display of stretch glyphs when hscrolled on PGTK
  2022-03-04 12:06 ` master 4df7bb9c01 2/2: Fix display of stretch glyphs when hscrolled on PGTK Eli Zaretskii
@ 2022-03-04 12:37   ` Po Lu
  0 siblings, 0 replies; 2+ messages in thread
From: Po Lu @ 2022-03-04 12:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> The 'if (x < text_left_x && !s->row->mode_line_p)' condition is tested
> again inside the block conditioned on that.  Is that necessary?

Thanks for catching that, it will be fixed shortly.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-04 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.7333.1646390109.1056.emacs-diffs@gnu.org>
2022-03-04 12:06 ` master 4df7bb9c01 2/2: Fix display of stretch glyphs when hscrolled on PGTK Eli Zaretskii
2022-03-04 12:37   ` Po Lu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).