unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Anders Lindgren <andlind@gmail.com>
To: Alan Third <alan@idiocy.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: NS port horizontal scroll-bars
Date: Sun, 24 Apr 2016 19:28:58 +0200	[thread overview]
Message-ID: <CABr8ebZjKC_Laq2tcU34JyJSqztEPfX-5Sz_gxBhfxKMF=2zsQ@mail.gmail.com> (raw)
In-Reply-To: <20160424160123.GA37657@breton.local>

[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]

Hi!

I think you simply haven't mapped the horizontal events to anything.
ns-win.el contains the following:

(global-set-key [vertical-scroll-bar down-mouse-1]
'ns-handle-scroll-bar-event)
(global-unset-key [vertical-scroll-bar mouse-1])
(global-unset-key [vertical-scroll-bar drag-mouse-1])

If I do the same with `horizontal-scroll-bar' I can drag it around, and
Emacs react to it. (Unfortunately, it then scroll the window vertically
rather than horizontally, but that just a technicality :)

Also, if you evaluate (read-key-sequence "Click on something: ") and either
click on the empty space next to the scroll bar or drag it, it will return
events with the type `horizontal-scroll-bar'.

Thanks for starting to work on the NS port!

    -- Anders


On Sun, Apr 24, 2016 at 6:01 PM, Alan Third <alan@idiocy.org> wrote:

> I've been trying to complete the horizontal scroll-bars implementation
> in the NS port and have run into a bit of a problem I can't work out.
>
> They display correctly, and when you click on them they, I think, send
> a correctly formatted emacs_event, but nothing happens. Vertical
> scroll-bars work as expected.
>
> Have I missed somewhere where I need to enable the horizontal
> scroll-bar events or something? Any pointers would be appreciated.
>
> I've attached a patch containing what I've done so far.
> --
> Alan Third
>

[-- Attachment #2: Type: text/html, Size: 2010 bytes --]

  reply	other threads:[~2016-04-24 17:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-24 16:01 NS port horizontal scroll-bars Alan Third
2016-04-24 17:28 ` Anders Lindgren [this message]
2016-04-25 20:34   ` Alan Third
2016-04-26  5:39     ` Anders Lindgren
2016-04-26  6:35     ` martin rudalics
2016-04-26  9:51       ` Alan Third
2016-04-26 11:27         ` YAMAMOTO Mitsuharu
2016-04-26 17:07           ` Alan Third
  -- strict thread matches above, loose matches on Subject: below --
2016-05-01 14:40 Angelo Graziosi

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='CABr8ebZjKC_Laq2tcU34JyJSqztEPfX-5Sz_gxBhfxKMF=2zsQ@mail.gmail.com' \
    --to=andlind@gmail.com \
    --cc=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    /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).