unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#687: what was changed for mouse wheel? where is this documented?
@ 2009-01-03 18:16 Drew Adams
  2009-01-04  2:18 ` Jason Rumney
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2009-01-03 18:16 UTC (permalink / raw)
  To: 687; +Cc: 'Chong Yidong'

> >> I see.  Can you verify that Lennart's patch works on W32?
> >
> > Lennart's patch works, but it might be better to make wheel events on 
> > W32 set the appropriate click, double or triple modifier so that it is 
> > caught by the conditions that follow.
> 
> I have changed the code to make wheel events appear as click events 
> (double and triple wheel events were already handled correctly).
> 
> I am still confused about all the steps an event goes through to become 
> a Lisp event, as the click modifier was being set on the wheel events, 
> but wasn't returned by event-modifiers, which seems to ignore the 
> modifiers and just use the base name of the event to regenerate them. 
> Are the modifiers we set in C code that untrustworthy?

Sorry to interject, but which code did you change? I'd like to take a look. I
don't see a recent change to mwheel.el in CVS. And I still see `wheel-(up|down)'
events mentioned in the Elisp manual (in CVS).

The Elisp manual still says that it is only on some systems that wheel movements
get translated to `mouse-4' and `mouse-5'. And it explicitly advises, for
portable code, to use variables `mouse-wheel-(up|down)-event'. Has this changed?

I have code that tests for `wheel-up' and `wheel-down', for versions of Emacs
starting with 21 (as well as other wheel tests for Emacs 20). I test those
events in five different libraries. Likewise, I test, and bind,
mouse-wheel-(up|down)-event.

I also use a mouse that has 5 buttons, for which neither `mouse-4' nor `mouse-5'
is the wheel in any way. It's useful to be able to distinguish a 4th and 5th
mouse button from wheel movement.

I'm interested to see how your change changes these things and whether it will
break my code. Where would I find an explanation of what previously corresponds
to what now, so I can adapt my code to work in Emacs 23 as well as previous
versions? That is, how does the mouse wheel map to the various Emacs versions?
So far, my code works with Emacs 20 through 22; I just need it to work with
Emacs 23 also.








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

* bug#687: what was changed for mouse wheel? where is this documented?
  2009-01-03 18:16 bug#687: what was changed for mouse wheel? where is this documented? Drew Adams
@ 2009-01-04  2:18 ` Jason Rumney
  2009-01-04  3:15   ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Rumney @ 2009-01-04  2:18 UTC (permalink / raw)
  To: Drew Adams; +Cc: 687, 'Chong Yidong'

Drew Adams wrote:
> Sorry to interject, but which code did you change?
keyboard.c. The only user visible change is that (event-modifiers 
(last-input-event)) after a wheel-up or wheel-down event returns 'click 
in the list of modifiers, where it didn't before, which causes 
mouse-avoidance-mode to ignore the wheel when deciding whether to move 
the mouse pointer.







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

* bug#687: what was changed for mouse wheel? where is this documented?
  2009-01-04  2:18 ` Jason Rumney
@ 2009-01-04  3:15   ` Drew Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2009-01-04  3:15 UTC (permalink / raw)
  To: 'Jason Rumney'; +Cc: 687, 'Chong Yidong'

> > Sorry to interject, but which code did you change?
>
> keyboard.c. The only user visible change is that (event-modifiers 
> (last-input-event)) after a wheel-up or wheel-down event 
> returns 'click in the list of modifiers, where it didn't before,
> which causes mouse-avoidance-mode to ignore the wheel when deciding 
> whether to move the mouse pointer.

OK, thanks for the explanation. 

And I suppose that nothing else changed wrt mouse wheel for Emacs Lisp from
Emacs 22 to 23. If that's correct, then I shouldn't have to change anything in
my code. Thx.







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

end of thread, other threads:[~2009-01-04  3:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-03 18:16 bug#687: what was changed for mouse wheel? where is this documented? Drew Adams
2009-01-04  2:18 ` Jason Rumney
2009-01-04  3:15   ` Drew Adams

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).