From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Changes in frame/window code Date: Mon, 18 Aug 2014 19:22:46 +0300 Message-ID: <83ha19day1.fsf@gnu.org> References: <53CE6A44.1010708@gmx.at> <83egx5h86z.fsf@gnu.org> <53D68806.9080101@gmx.at> <838undgxiu.fsf@gnu.org> <53D76758.2030707@gmx.at> <831tt4h58x.fsf@gnu.org> <83y4vcfoqi.fsf@gnu.org> <53D77BDB.1090500@gmx.at> <83wqawflgj.fsf@gnu.org> <53D7A981.30909@gmx.at> <83lhrctdzr.fsf@gnu.org> <53D7C10C.4010402@gmx.at> <83k36wta5m.fsf@gnu.org> <53D7E6B0.7040504@gmx.at> <83egx4t3nq.fsf@gnu.org> <53D917B5.2050604@gmx.at> <837g2uu80w.fsf@gnu.org> <53D9211C.7010000@gmx.at> <834mxyu5jg.fsf@gnu.org> <53D92D04.3010006@gmx.at> <83zjfqspfw.fsf@gnu.org> <53DA0310.4010706@gmx.at> <53DA15C4.5050006@gmx.at> <83mwbpss6s.fsf@gnu.org> <53DA29EC.3000504@gmx.at> <837g2ssg30.fsf@gnu.org> <53DB6B08.7000305@gmx.at> <834mxws6a0.fsf@gnu.org> <53DBB268.2020909@gmx.at> <831tt0rwyp.fsf@gnu.org> <53EE2CD5.50603@gmx.a> <83tx5demej.fsf@gnu.org> <53EF25F2.9010909@gmx.at> <83iolsekqd.fsf@gnu.org> <53EF609C.2090303@gmx> <83wqa7cfoy.fsf@gnu.org> <53F1B9EA.6030808@gmx.at> <83lhqldeqf.fsf@gnu.org> <53F225A7.6030103@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1408378998 25909 80.91.229.3 (18 Aug 2014 16:23:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Aug 2014 16:23:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 18 18:23:11 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 1XJPiA-0003ya-TJ for ged-emacs-devel@m.gmane.org; Mon, 18 Aug 2014 18:23:11 +0200 Original-Received: from localhost ([::1]:44696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJPiA-0007NO-87 for ged-emacs-devel@m.gmane.org; Mon, 18 Aug 2014 12:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJPi3-0007Jt-D7 for emacs-devel@gnu.org; Mon, 18 Aug 2014 12:23:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJPhw-00071X-Ud for emacs-devel@gnu.org; Mon, 18 Aug 2014 12:23:03 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:46678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJPhw-00071H-Lu for emacs-devel@gnu.org; Mon, 18 Aug 2014 12:22:56 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NAI00800FZMT200@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Mon, 18 Aug 2014 19:22:54 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NAI0089EG65RW40@a-mtaout21.012.net.il>; Mon, 18 Aug 2014 19:22:54 +0300 (IDT) In-reply-to: <53F225A7.6030103@gmx.at> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:173746 Archived-At: > Date: Mon, 18 Aug 2014 18:11:19 +0200 > From: martin rudalics > CC: emacs-devel@gnu.org > > > but it's still unclear to me why this problem is not visible > > in L2R buffers. > > Because for L2R I count the part from the leftmost position to the start > of the scroll bar thumb which is unaffected by the size of the thumb? If so, we have an off-by-one error somewhere, since these are just pixel values with nothing magic about them. > > . The erratic behavior seems to be due to our own code resetting the > > thumb position right after I drag the thumb to some new position. > > The code which causes this seems to be -- surprise, surprise -- > > set_horizontal_scroll_bar that calls > > set_horizontal_scroll_bar_hook passing it the previous position. > > I didn't yet figure out why this affects only R2L lines. > > You mean that w->hscroll has its previous value in > > start = w->hscroll * FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)); > > in xdisp.c although w->hscroll was in between changed by > `scroll-bar-horizontal-drag-1'? I didn't analyze this further, but it should be easy to verify. > > . If point is on an empty line, the problem doesn't happen. > > Confirmed. > > > Likewise, if I drag the scroll bar of a non-selected window, the > > problem doesn't happen, either. > > Confirmed, too. Weird. Do we somewhere try more hard to autoscroll > when the window is selected? See hscroll_windows: we scroll all windows in a window tree. > > Maybe we call the scroll-bar hook > > too early, without giving redisplay the chance to hscroll all the > > windows? > > Wouldn't in such case the result be that some windows fail to get > scrolled? Isn't that exactly what we observe here?