all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* mouse wheel scrolling in gtk
@ 2008-07-30  0:31 Joachim Nilsson
  2008-07-30  0:45 ` Miles Bader
  0 siblings, 1 reply; 7+ messages in thread
From: Joachim Nilsson @ 2008-07-30  0:31 UTC (permalink / raw)
  To: emacs-devel

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

Hi!

I often have just one Emacs frame open on my X desktop.  It's usually
fully maximized (full screen with no borders) to utilize all possible
screen estate.

This frame is usually split in several windows. (I often also use ECB,
but this report applies regardless.)

When coding I use these windows to display all types of references (.c
and .h files) while having one "main" window where my current focus is. 
This is also where I want my cursor to sit.  Frequently I want to scroll
up/down in one of the other windows (where my cursor is not ...) so I
move my mouse and use the scroll-wheel to pan the reference list.

In Emacs (toolkit: gtk) I cannot use the wheel to (vertically) scroll
unless the cursor is there as well.  Correction, if I hold the pointer
above that window's scroll bar I can, but not over any other part of
that other window. 

This is a bit counter intuitive since other Gtk/Gnome applications honor
this.  I.e. you can mouse-wheel-scroll any of an applications parts
without having to first click/focus that part of the application.

Can this be fixed, or is there perhaps some configuration setting that I
have missed?

Regards
 /Jocke

P.S.  I hope I have used the correct Emacs terms (frame vs. window). 





[-- Attachment #2: joachim_nilsson.vcf --]
[-- Type: text/x-vcard, Size: 167 bytes --]

begin:vcard
fn:Joachim Nilsson
n:Nilsson;Joachim
email;internet:joachim.nilsson@vmlinux.org
x-mozilla-html:TRUE
url:http://vmlinux.org/joachim/
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mouse wheel scrolling in gtk
  2008-07-30  0:31 mouse wheel scrolling in gtk Joachim Nilsson
@ 2008-07-30  0:45 ` Miles Bader
  2008-07-30  0:57   ` Drew Adams
  2008-07-30  1:38   ` Joachim Nilsson
  0 siblings, 2 replies; 7+ messages in thread
From: Miles Bader @ 2008-07-30  0:45 UTC (permalink / raw)
  To: Joachim Nilsson; +Cc: emacs-devel

Joachim Nilsson <joachim.nilsson@vmlinux.org> writes:
> This is a bit counter intuitive since other Gtk/Gnome applications honor
> this.  I.e. you can mouse-wheel-scroll any of an applications parts
> without having to first click/focus that part of the application.
>
> Can this be fixed, or is there perhaps some configuration setting that I
> have missed?

C-h v mouse-wheel-follow-mouse RET

   `mouse-wheel-follow-mouse' is a variable defined in `mwheel.el'.

   Whether the mouse wheel should scroll the window that the mouse is over.
   This can be slightly disconcerting, but some people prefer it.

[I set this to t myself, and I think the default value is kind of silly
personally...]

-Miles

-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]




^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: mouse wheel scrolling in gtk
  2008-07-30  0:45 ` Miles Bader
@ 2008-07-30  0:57   ` Drew Adams
  2008-07-30  1:56     ` Stefan Monnier
  2008-07-30  1:38   ` Joachim Nilsson
  1 sibling, 1 reply; 7+ messages in thread
From: Drew Adams @ 2008-07-30  0:57 UTC (permalink / raw)
  To: 'Miles Bader', 'Joachim Nilsson'; +Cc: emacs-devel

> > This is a bit counter intuitive since other Gtk/Gnome 
> > applications honor this.  I.e. you can mouse-wheel-scroll any of
> > an applications parts without having to first click/focus that
> > part of the application.
> >
> > Can this be fixed, or is there perhaps some configuration 
> > setting that I have missed?
> 
> C-h v mouse-wheel-follow-mouse RET
> 
>    `mouse-wheel-follow-mouse' is a variable defined in `mwheel.el'.
> 
>    Whether the mouse wheel should scroll the window that the 
>    mouse is over. This can be slightly disconcerting, but some
>    people prefer it.
> 
> [I set this to t myself, and I think the default value is 
> kind of silly personally...]

I don't use Gtk/Gnome much, so I don't really care about this for my own use,
but I agree with Miles (and, I suspect, Joachim).

It seems silly that the default behavior of a mouse wheel wouldn't be to scroll
what the mouse points to. Talk about counter-intuitive...

And I (obviously) think the last part of the doc string is inappropriate and
should be removed. On the contrary, it's disconcerting to have a pointing device
*not* act on what it points to but on something somewhere else. The mouse should
identify by its location what it acts on. Sheesh...

[Also, "this" is ambiguous in the last doc-string sentence. The sentence really
says that "whether..." can be disconcerting. I suspect it is trying to say
instead that scroll focus following the mouse (that is, a value of t) can be
disconcerting (which is wrong, IMO).]





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mouse wheel scrolling in gtk
  2008-07-30  0:45 ` Miles Bader
  2008-07-30  0:57   ` Drew Adams
@ 2008-07-30  1:38   ` Joachim Nilsson
  1 sibling, 0 replies; 7+ messages in thread
From: Joachim Nilsson @ 2008-07-30  1:38 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

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

Solved!

Miles Bader wrote, on 07/30/2008 02:45 AM:
> Joachim Nilsson <joachim.nilsson@vmlinux.org> writes:
>   
>> This is a bit counter intuitive since other Gtk/Gnome applications honor
>> this.  I.e. you can mouse-wheel-scroll any of an applications parts
>> without having to first click/focus that part of the application.
>> Can this be fixed, or is there perhaps some configuration setting that I
>> have missed?
>>     
> C-h v mouse-wheel-follow-mouse RET
>    `mouse-wheel-follow-mouse' is a variable defined in `mwheel.el'.
>    Whether the mouse wheel should scroll the window that the mouse is over.
>    This can be slightly disconcerting, but some people prefer it.
>   

Ouch, thanks Miles!

Turns out I had the following culprit embedded deep in my .emacs:

;; setup scroll mouse settings
(defun up-slightly () (interactive) (scroll-up 5))
(defun down-slightly () (interactive) (scroll-down 5))
(global-set-key [mouse-4] 'down-slightly)
(global-set-key [mouse-5] 'up-slightly)

(defun up-one () (interactive) (scroll-up 1))
(defun down-one () (interactive) (scroll-down 1))
(global-set-key [S-mouse-4] 'down-one)
(global-set-key [S-mouse-5] 'up-one)

(defun up-a-lot () (interactive) (scroll-up))
(defun down-a-lot () (interactive) (scroll-down))
(global-set-key [C-mouse-4] 'down-a-lot)
(global-set-key [C-mouse-5] 'up-a-lot)

As soon as I'd removed it the default settings for mouse wheel mode
worked just fine for my purposes!

Many thanks!
 /Jocke


[-- Attachment #2: joachim_nilsson.vcf --]
[-- Type: text/x-vcard, Size: 167 bytes --]

begin:vcard
fn:Joachim Nilsson
n:Nilsson;Joachim
email;internet:joachim.nilsson@vmlinux.org
x-mozilla-html:TRUE
url:http://vmlinux.org/joachim/
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mouse wheel scrolling in gtk
  2008-07-30  0:57   ` Drew Adams
@ 2008-07-30  1:56     ` Stefan Monnier
  2008-07-30  2:00       ` Miles Bader
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2008-07-30  1:56 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Joachim Nilsson', emacs-devel, 'Miles Bader'

> I don't use Gtk/Gnome much, so I don't really care about this for my own use,
> but I agree with Miles (and, I suspect, Joachim).

Great, so we all agree.  Including the CVS trunk.
Let's all have a hug,


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mouse wheel scrolling in gtk
  2008-07-30  1:56     ` Stefan Monnier
@ 2008-07-30  2:00       ` Miles Bader
  2008-07-30  2:30         ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2008-07-30  2:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 'Joachim Nilsson', Drew Adams, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Great, so we all agree.  Including the CVS trunk.
> Let's all have a hug,

Whoops... :-)

Perhaps the editorializing in the docstring should be removed?

-Miles

-- 
"An atheist doesn't have to be someone who thinks he has a proof that
there can't be a god.  He only has to be someone who believes that the
evidence on the God question is at a similar level to the evidence on
the werewolf question."  [John McCarthy]




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mouse wheel scrolling in gtk
  2008-07-30  2:00       ` Miles Bader
@ 2008-07-30  2:30         ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2008-07-30  2:30 UTC (permalink / raw)
  To: Miles Bader; +Cc: 'Joachim Nilsson', Drew Adams, emacs-devel

>> Great, so we all agree.  Including the CVS trunk.
>> Let's all have a hug,

> Whoops... :-)

> Perhaps the editorializing in the docstring should be removed?

I don't think it's important either way,


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-07-30  2:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30  0:31 mouse wheel scrolling in gtk Joachim Nilsson
2008-07-30  0:45 ` Miles Bader
2008-07-30  0:57   ` Drew Adams
2008-07-30  1:56     ` Stefan Monnier
2008-07-30  2:00       ` Miles Bader
2008-07-30  2:30         ` Stefan Monnier
2008-07-30  1:38   ` Joachim Nilsson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.