From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: Changes in frame/window code
Date: Mon, 18 Aug 2014 18:00:56 +0300 [thread overview]
Message-ID: <83lhqldeqf.fsf@gnu.org> (raw)
In-Reply-To: <53F1B9EA.6030808@gmx.at>
> Date: Mon, 18 Aug 2014 10:31:38 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: emacs-devel@gnu.org
>
> >> (1) When dragging I cannot move the slider entirely to the right and
> >> make the first column of R2L lines visible until I release the mouse
> >> button. I suppose this is due to some off-by-one failure here but
> >> there might be more to it.
> >
> > I'm not sure this is at all related to R2L lines. I wrote a trivial
> > function which just displays the mouse event, and bound it to clicks
> > on the horizontal scroll bar. When I drag the scroll bar, even in an
> > entirely L2R buffer, I see some strange phenomena: e.g., more often
> > than not, when I drag the bar all the way to the right, releasing the
> > mouse button without moving the mouse reports slightly different
> > coordinates than the ones reported before releasing the mouse.
> > Moreover, many time the 2nd coordinate reported after releasing the
> > mouse is -1. Try it. Maybe it's Windows-specific, I don't know.
>
> I suppose the -1 is due to the
>
> si.nPage = min (portion, si.nMax) + 1;
>
> you mention below and that's likely the culprit for the effect described
> in (1).
Perhaps, but it's still unclear to me why this problem is not visible
in L2R buffers.
> > Btw, it looks like the information returned by mouse events on the
> > horizontal scroll bar is not described anywhere, not even in NEWS.
> > Your use of (cdr (nth 2 start-position)) in
> > scroll-bar-horizontal-drag-1 got my jaw dropped for a few seconds,
> > before I realized it was not the Y coordinate...
>
> I'm not sure yet where to eventually put this and whether it's the right
> solution at all. IIUC the scroll bar area on the right of the thumb stands
> for w->hscroll in R2L text and this was the easiest way to pass on that
> value from what GetScrollInfo returns without consing. If you have any
> suggestion how to handle this cleanly I'd be all ears.
I don't think your solution is unclean (the Y coordinate makes no
sense for horizontal scroll bar events), I just wish it were
documented, at least in NEWS. It doesn't take more than a few lines.
> >> (2) Sometimes during dragging the slider starts moving for-/backward in
> >> some erratic fashion. I'm not yet sure whether this is caused by an
> >> hmargin issue or something else.
> >
> > I could only see this in the very first line of the tutorial. There
> > was an old and very subtle bug in xdisp.c, revealed by
> > set_horizontal_scroll_bar, which caused broken cursor motion in that
> > line. This is now fixed in r117711 on the trunk. If you still see
> > something like that, and it's not related to the few L2R lines in the
> > tutorial, please report a bug with the recipe.
>
> I can see it only with my personal setup here. With emacs -Q I can
> reproduce it by setting
>
> (set-frame-parameter nil 'right-divider-width 7)
>
> and scrolling the tutorial in the left window of a C-x 3 split frame.
On Windows XP, I cannot see this at all. On Windows 7, I always see
this on the 1st line of the tutorial, even without setting
right-divider-width, and I see it when point is on most (but not all,
see below) lines if I do set right-divider-width.
Alas, I'm not your guy in these matters, as I'm clueless as to GUI
programming in general and Windows GUI in particular. So I just
sprinkled fprintf lines in suspect places and watched them while
exercising the erratic behavior of the scroll bar. Here are some
observations that might help you figure this out:
. 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.
. If point is on an empty line, the problem doesn't happen.
Likewise, if I drag the scroll bar of a non-selected window, the
problem doesn't happen, either. Maybe we call the scroll-bar hook
too early, without giving redisplay the chance to hscroll all the
windows?
(Btw, note that I needed a small change to be able to scroll correctly
non-selected windows; see r117712 on the trunk.)
(Btw2, when is x_horizontal_scroll_bar_report_motion called? I
couldn't see it being called when the scroll bar is used.)
HTH
next prev parent reply other threads:[~2014-08-18 15:00 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 13:42 Changes in frame/window code martin rudalics
2014-07-23 10:45 ` Dmitry Antipov
2014-07-23 12:48 ` martin rudalics
2014-07-23 15:05 ` set-frame-height glitch [Was: Re: Changes in frame/window code] Dmitry Antipov
2014-07-23 15:36 ` martin rudalics
2014-07-23 15:26 ` Changes in frame/window code martin rudalics
2014-07-23 16:14 ` martin rudalics
2014-07-23 10:59 ` Dmitry Antipov
2014-07-23 12:48 ` martin rudalics
2014-07-27 13:32 ` martin rudalics
2014-07-27 14:50 ` Jan Djärv
2014-07-27 18:14 ` martin rudalics
2014-07-27 14:50 ` Eli Zaretskii
2014-07-27 18:07 ` Eli Zaretskii
2014-07-27 18:19 ` martin rudalics
2014-07-28 4:48 ` Dmitry Antipov
2014-07-28 9:27 ` martin rudalics
2014-07-28 18:22 ` Hint on Xaw3d scroll bar colors issue [Was: Re: Changes in frame/window code] Dmitry Antipov
2014-07-29 9:21 ` martin rudalics
2014-07-29 11:27 ` Dmitry Antipov
2014-07-29 14:01 ` martin rudalics
2014-07-29 15:42 ` Jan Djärv
2014-07-29 16:54 ` Dmitry Antipov
2014-07-29 17:17 ` Jan Djärv
2014-07-30 16:44 ` martin rudalics
2014-07-29 16:43 ` Bingo [Re: Hint on Xaw3d scroll bar colors issue [Was: Re: Changes in frame/window code]] Dmitry Antipov
2014-07-29 17:14 ` Jan Djärv
2014-07-30 16:44 ` martin rudalics
2014-07-29 9:19 ` Changes in frame/window code martin rudalics
2014-07-29 11:28 ` Dmitry Antipov
[not found] ` <83tx62hane.fsf@gnu.org>
2014-07-28 9:26 ` martin rudalics
2014-07-28 13:38 ` Eli Zaretskii
2014-07-28 13:57 ` martin rudalics
2014-07-28 14:25 ` Eli Zaretskii
2014-07-28 17:27 ` martin rudalics
2014-07-28 18:15 ` Eli Zaretskii
2014-07-29 9:20 ` martin rudalics
2014-07-29 9:41 ` Eli Zaretskii
2014-07-29 9:55 ` Eli Zaretskii
2014-07-29 10:47 ` martin rudalics
2014-07-29 10:23 ` Eli Zaretskii
2014-07-29 10:47 ` martin rudalics
2014-07-29 11:33 ` Eli Zaretskii
2014-07-29 14:02 ` martin rudalics
2014-07-29 14:51 ` Eli Zaretskii
2014-07-29 15:43 ` martin rudalics
2014-07-29 16:14 ` Eli Zaretskii
2014-07-29 18:23 ` martin rudalics
2014-07-29 18:34 ` Eli Zaretskii
2014-07-30 16:05 ` martin rudalics
2014-07-30 16:27 ` Eli Zaretskii
2014-07-30 16:45 ` martin rudalics
2014-07-30 17:20 ` Eli Zaretskii
2014-07-30 17:36 ` martin rudalics
2014-07-30 17:53 ` Eli Zaretskii
2014-07-31 8:49 ` martin rudalics
2014-07-31 10:06 ` Eli Zaretskii
2014-07-31 10:09 ` martin rudalics
2014-07-31 11:06 ` Eli Zaretskii
2014-07-31 11:35 ` martin rudalics
2014-08-01 9:40 ` Eli Zaretskii
2014-08-01 10:25 ` martin rudalics
2014-08-01 13:12 ` Eli Zaretskii
2014-08-01 15:29 ` martin rudalics
2014-08-01 16:33 ` Eli Zaretskii
[not found] ` <53EE2CD5.50603@gmx.a>
2014-08-15 15:52 ` martin rudalics
2014-08-15 16:40 ` Eli Zaretskii
2014-08-16 9:35 ` martin rudalics
2014-08-16 11:29 ` Eli Zaretskii
[not found] ` <53EF609C.2090303@gmx>
2014-08-16 13:46 ` martin rudalics
2014-08-16 14:43 ` Eli Zaretskii
2014-08-16 16:07 ` martin rudalics
2014-08-16 16:09 ` martin rudalics
2014-08-16 16:19 ` martin rudalics
2014-08-17 15:13 ` Eli Zaretskii
2014-08-18 8:31 ` martin rudalics
2014-08-18 15:00 ` Eli Zaretskii [this message]
2014-08-18 16:11 ` martin rudalics
2014-08-18 16:22 ` Eli Zaretskii
2014-08-19 15:15 ` Eli Zaretskii
2014-08-20 14:45 ` Eli Zaretskii
2014-08-20 15:32 ` martin rudalics
2014-08-20 15:32 ` martin rudalics
2014-08-20 15:49 ` Eli Zaretskii
2014-08-28 9:40 ` martin rudalics
2014-08-28 15:10 ` Eli Zaretskii
2014-08-28 19:05 ` martin rudalics
2014-08-28 19:15 ` Eli Zaretskii
2014-08-29 9:00 ` martin rudalics
2014-08-29 9:53 ` Eli Zaretskii
2014-08-31 15:48 ` Eli Zaretskii
2014-08-31 16:22 ` martin rudalics
2014-08-28 15:56 ` Glenn Morris
2014-08-28 19:04 ` martin rudalics
2014-07-29 20:35 ` Jan Djärv
2014-07-29 10:44 ` martin rudalics
2014-07-29 15:29 ` Jan Djärv
2014-07-29 16:34 ` Eli Zaretskii
2014-07-31 16:18 ` Stefan Monnier
2014-07-31 16:37 ` Tassilo Horn
2014-07-31 16:53 ` martin rudalics
2014-08-27 17:13 ` Drew Adams
2014-07-31 17:32 ` Eli Zaretskii
2014-07-31 16:38 ` Eli Zaretskii
2014-07-31 16:53 ` martin rudalics
2014-09-03 16:17 ` martin rudalics
2014-09-04 18:30 ` Glenn Morris
2014-09-05 10:47 ` martin rudalics
2014-09-05 17:14 ` Glenn Morris
2014-07-27 18:15 ` martin rudalics
2014-07-27 17:14 ` Stefan Monnier
2014-07-27 18:15 ` martin rudalics
2014-07-27 20:28 ` Glenn Morris
2014-08-05 1:42 ` Jay Belanger
2014-08-05 8:38 ` martin rudalics
2014-08-05 14:37 ` Jay Belanger
2014-08-05 15:45 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83lhqldeqf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).