unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: Not a regression, but shuld go into emacs-24
Date: Tue, 03 Jun 2014 09:23:00 +0200	[thread overview]
Message-ID: <538D77D4.2000407@gmx.at> (raw)
In-Reply-To: <56311164-C9D0-4A58-A85C-2E3F821299AA@swipnet.se>

 >> IIUC in XmCR_DRAG we set PORTION to 'cs->value',
 >
 > XmCR_DRAG is jump in Motif speak.

So is "dragging the slider" equivalent to 'jump' in Emacs speak?  Then I
misunderstood the nomenclature completely.  I always thought a 'jump' is
what happens when I click some position above or below the slider.

Reading http://comments.gmane.org/gmane.emacs.devel/6201 confuses me
even more.

 >> in xg_scroll_callback
 >> we set PORTION to 'position'
 >
 > No we don't, please look at the current code.  portion and whole are initialized to 0 and
 > only set for JUMP.

You're obviously right.  I was paying attention only to slider-based
actions.  PORTION and WHOLE seem to be not used for anything else.

 >> and in xaw_scroll_callback we explicitly
 >> pass 'position' as PORTION argument.
 >
 > Because that callback does not distinguish between the different scroll modes.

What is a "scroll mode"?  Something like "page increment" or "jump
scroll"?

 >>   So in all three cases we pass a
 >> position.  And IIUC we pass zero for PORTION and WHOLE iff when we end
 >> scrolling (when the user releases the slider).
 >
 > Iff is clearly wrong.  Look  at xg_scroll_callback and do tell me how
 > portion and whole gets a value other than zero when scroll is not
 > GTK_SCROLL_JUMP.

Yes (see above).  But for jumping we always pass a position expressed as
the portion of WHOLE that comes before the start of the slider.  I still
think that using the term PORTION to express the relative position of
the slider in one case and the relative size of the slider in the other
is unfortunate.  Obviously, after working with the code for years this
distinction boils down to a cosmetic issue ...

 > Ditto for xm_scroll_callback when cs->reason is not XmCR_DRAG.

Yes (see above).

 >>> For jump scroll, PORTION is the position of the scroll bar thumb that we jump to.
 >>
 >> I didn't look into jump scroll so far.  But what you say here indicates
 >> that jump scroll also passes a position via the PORTION argument.

So apparently I was _only_ looking into jump scroll so far.

 >>> The values of PORTION in x_send_scroll_bar_event and
 >>> x_set_toolkit_scroll_bar_thumb are different.  The first has values as
 >>> defined by the scroll bar.  For Gtk+, Motif and Xaw this is a value
 >>> between 0 or 1 and 10000000.
 >>
 >> Yes (in my experience Gtk+ can handle WHOLE directly as is).
 >
 > This looks ugly when WHOLE changes.  The Gtk+ scroll bar does not redraw nicely.

In what sense?  Does it flicker?

martin



  reply	other threads:[~2014-06-03  7:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01 10:43 Not a regression, but shuld go into emacs-24 Jan Djärv
2014-06-01 12:31 ` martin rudalics
2014-06-01 18:11   ` Jan Djärv
2014-06-02  7:05     ` martin rudalics
2014-06-02 15:50       ` Jan Djärv
2014-06-02 18:02         ` martin rudalics
2014-06-02 18:14           ` martin rudalics
2014-06-03  5:10           ` Jan Djärv
2014-06-03  7:23             ` martin rudalics [this message]
2014-06-03  7:47               ` Jan D.
2014-06-03  9:41                 ` martin rudalics
2014-06-03 10:13                   ` Jan D.
2014-06-03 12:40                     ` martin rudalics
2014-06-01 14:15 ` Stefan Monnier
2014-06-01 18:01   ` Jan Djärv

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=538D77D4.2000407@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=jan.h.d@swipnet.se \
    /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).