From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.devel Subject: Re: NS port horizontal scroll-bars Date: Sun, 24 Apr 2016 19:28:58 +0200 Message-ID: References: <20160424160123.GA37657@breton.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c123cfa2eadf605313e65c0 X-Trace: ger.gmane.org 1461518966 1405 80.91.229.3 (24 Apr 2016 17:29:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Apr 2016 17:29:26 +0000 (UTC) Cc: emacs-devel To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 24 19:29:26 2016 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 1auNqX-0002UZ-Ue for ged-emacs-devel@m.gmane.org; Sun, 24 Apr 2016 19:29:26 +0200 Original-Received: from localhost ([::1]:56059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auNqX-0007QW-BB for ged-emacs-devel@m.gmane.org; Sun, 24 Apr 2016 13:29:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auNq8-0007MA-TG for emacs-devel@gnu.org; Sun, 24 Apr 2016 13:29:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auNq7-0000Q2-N7 for emacs-devel@gnu.org; Sun, 24 Apr 2016 13:29:00 -0400 Original-Received: from mail-yw0-x232.google.com ([2607:f8b0:4002:c05::232]:36555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auNq7-0000Py-Gw for emacs-devel@gnu.org; Sun, 24 Apr 2016 13:28:59 -0400 Original-Received: by mail-yw0-x232.google.com with SMTP id o66so169991412ywc.3 for ; Sun, 24 Apr 2016 10:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=Yv/FUinU/vdF6rnfGgxnZma+l2e72eY78e04wuRUo9I=; b=Lt6kotYEJ5EmbgRkRYoLEXAExs+0hkpbZ8xWbzuq56UQ0j0+jgmu7jUWkw/cny6C+N ZiUnARPbQjTQU+soYLcOTMQSGdWyDhgF/t8zWWfUmJqZl0HtTkhV4xcajh91vrZzEcti uo7GZasLBAltz3wZFsHsjoHxA3tshfLX9lBxAEDEy0glcfUmv90fvknAtOixfcJKiuzD LUDnck+t775IDt4FrgzBV5diDLE3o7l/z5YRg33Eaa8ub9ozuA7wJbE6iA4HBymRZWcK orNnu6ifWAx8qL9KtW5mOADXiXrbMi0gJsdCllNdmDKUiimQsG85yNPe32buHwcubfP5 1PPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=Yv/FUinU/vdF6rnfGgxnZma+l2e72eY78e04wuRUo9I=; b=l4jBP9OEFmgv01T/mDBOipy7n8Bq4MWqpWrGPQVQu+LlIK4P9xU+Adkh5+aLK5Sg1q 9aR1SSgQNA2EPcUsKHXNp3Gbk8rm9nU0/k3mVE3270X5AGKfu96UXyOFIWkOWK5u2Jrq Z8r01HLSiv/BtWJdluJRLgteOh210zZ955yw+v0Z/mpDhr2VxmPq2LDBWNm6s5PkotMc ZobZoHOS0D8VNg7r69mFX66e2UeoiQqYx1BSLwM0z6AsM71yaxtJoqIQIzeaRBWfHQhT jISVEkJidCHLw3Z15yhXxnNcaKKeTHthSQI4ZpzkEZsh8n7rqGXpNHp/F4AWqnw/zG7z eS4Q== X-Gm-Message-State: AOPr4FVx4OmYYvvSMVOW20b+afaq3xmaswkjxA2OVWNFsllL+7G5zSqacPIycd71GnaJvN+xz9104XF+WzK75g== X-Received: by 10.159.39.33 with SMTP id a30mr9499159uaa.59.1461518938840; Sun, 24 Apr 2016 10:28:58 -0700 (PDT) Original-Received: by 10.31.214.131 with HTTP; Sun, 24 Apr 2016 10:28:58 -0700 (PDT) In-Reply-To: <20160424160123.GA37657@breton.local> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:203268 Archived-At: --94eb2c123cfa2eadf605313e65c0 Content-Type: text/plain; charset=UTF-8 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 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 > --94eb2c123cfa2eadf605313e65c0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

I think you simply haven't mapp= ed the horizontal events to anything. ns-win.el contains the following:
(global-set-key [vertical-scroll-bar down-mouse-1] 'ns-handle-scr= oll-bar-event)
(global-unset-key [vertical-scroll-bar mouse-1])
(glob= al-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 th= an horizontally, but that just a technicality :)

A= lso, if you evaluate=C2=A0(read-key-sequence "Click on something: &quo= t;) 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!

=C2=A0 =C2=A0 -- 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 implementat= ion
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

--94eb2c123cfa2eadf605313e65c0--