From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Changes in frame/window code Date: Tue, 29 Jul 2014 12:47:42 +0200 Message-ID: <53D77BCE.2050201@gmx.at> References: <53CE6A44.1010708@gmx.at> <53D4FF76.1060804@gmx.at> <8338dmj1of.fsf@gnu.org> <83wqayhe0o.fsf@gnu.org> <53D542B3.20206@gmx.at> <83tx62hane.fsf@gnu.org> <53D6172A.5010909@gmx.at> <83fvhlhad5.fsf@gnu.org> <53D656BB.3010201@gmx.at> <83egx5h86z.fsf@gnu.org> <53D68806.9080101@gmx.at> <838undgxiu.fsf@gnu.org> <53D76758.2030707@gmx.at> <831tt4h58x.fsf@gnu.org> <83zjfsfq14.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406630896 27745 80.91.229.3 (29 Jul 2014 10:48:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2014 10:48:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 29 12:48:09 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XC4wy-000323-MF for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 12:48:08 +0200 Original-Received: from localhost ([::1]:44639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC4wy-0007b2-9B for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 06:48:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC4wn-0007ar-4p for emacs-devel@gnu.org; Tue, 29 Jul 2014 06:48:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC4we-00011O-OQ for emacs-devel@gnu.org; Tue, 29 Jul 2014 06:47:57 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:50376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC4we-00010s-Es; Tue, 29 Jul 2014 06:47:48 -0400 Original-Received: from [93.82.14.115] ([93.82.14.115]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MEXHd-1XILHO2wxN-00FgOp; Tue, 29 Jul 2014 12:47:47 +0200 In-Reply-To: <83zjfsfq14.fsf@gnu.org> X-Provags-ID: V03:K0:GHFbZNNnOn7zlJkdQg+TPus3PMrsk1vzDb2pEn669NxE9FHdZQY hSPnqjC+iEeRF2K+mhgQkjhQp/IIKw1zDiYBrurh7Tqr5xPPVHPqQM2zYyQFaAzGpEG34C3 JVXtr8ugQQpIEeiVLjgL2WexxP642zGj6kgkxLxDnRKfB4b3Rk2JIkxiM8szqIHuFYrORFQ TpR+Nmd340B6orszF0vfw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173244 Archived-At: > 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. martin