[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes in frame/window code

From: martin rudalics
Subject: Re: Changes in frame/window code
Date: Tue, 29 Jul 2014 12:47:42 +0200

> Btw, I'm not sure I follow the logic of this snippet:
>        /* The following is needed to ensure that if after maximizing a
>     window we get hscroll > 0, we can still drag the thumb to the
>     left.  */
>        whole = max (whole, w->hscroll + box_width);
>        whole = max (whole, end - start);
> First, hscroll is in columns, while box_width is in pixels, so adding
> them sounds incorrect.
> Second, what problem does this try to solve, and why would this
> double-maxing solve it?
> And third, since end - start is exactly equal to box_width, why do you
> need the second max?  What am I missing?

IIUC what I wrote in my comment it seems that I had the following
problem: In a normal frame I had hscroll > 0 and after maximizing the
frame hscroll was still > 0 but the longest line was now less than the
width of the window so inherently it became impossible to drag the
scrollbar because the slider now occupied the full width.  This means I
could not scroll the text back to make its left part visible using the
scrollbar alone.  So I added this hack to do that.  But you observations
clearly show that there's some silliness in it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]