unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Mac OS X Carbon Emacs problem with mouse-2
@ 2004-09-21 12:36 Piet van Oostrum
  2004-09-21 14:16 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 4+ messages in thread
From: Piet van Oostrum @ 2004-09-21 12:36 UTC (permalink / raw)


Hello,

I updated emacs from CVS and compared to my previous compilation (about
half a year ago) mouse-2 doesn't work. Actually it is the click with the
mouse wheel button that stopped working properly, so it affects mouse-2 or
mouse-3 depending on the value of mac-wheel-button-is-mouse-2. When I click
with the mouse wheel button, only a 'down-mouse-2' event is generated
rather than a combo 'down-mouse-2 mouse-2' as it happens with mouse-3. This
has the effect that emacs is waiting for more events before it interprets
the click. When I use ALT left click it is properly generating the combo.

I have looked in the code but my knowledge of the Mac API is just too
limited. 
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl

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

* Re: Mac OS X Carbon Emacs problem with mouse-2
  2004-09-21 12:36 Mac OS X Carbon Emacs problem with mouse-2 Piet van Oostrum
@ 2004-09-21 14:16 ` YAMAMOTO Mitsuharu
  2004-09-21 15:07   ` Piet van Oostrum
       [not found]   ` <16720.17344.80483.650163@ordesa.cs.uu.nl>
  0 siblings, 2 replies; 4+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-09-21 14:16 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> On Tue, 21 Sep 2004 14:36:51 +0200, Piet van Oostrum <piet@cs.uu.nl> said:

> When I click with the mouse wheel button, only a 'down-mouse-2'
> event is generated rather than a combo 'down-mouse-2 mouse-2' as it
> happens with mouse-3.

Could you test the following patch?  I can't test it because I don't
have a wheel mouse.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

*** src/macterm.c.~1.77.~	Tue Sep 21 11:27:01 2004
--- src/macterm.c	Tue Sep 21 23:00:37 2004
***************
*** 7081,7092 ****
    if (!result && GetEventClass (eventRef) == kEventClassMouse)
      {
        UInt32 kind = GetEventKind (eventRef);
!       if (kind == kEventMouseDown && !(eventRec->what == mouseDown))
  	{
  	  eventRec->what = mouseDown;
  	  result=1;
  	}
!       if (kind == kEventMouseUp && !(eventRec->what == mouseUp))
  	{
  	  eventRec->what = mouseUp;
  	  result=1;
--- 7081,7092 ----
    if (!result && GetEventClass (eventRef) == kEventClassMouse)
      {
        UInt32 kind = GetEventKind (eventRef);
!       if (kind == kEventMouseDown)
  	{
  	  eventRec->what = mouseDown;
  	  result=1;
  	}
!       else if (kind == kEventMouseUp)
  	{
  	  eventRec->what = mouseUp;
  	  result=1;

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

* Re: Mac OS X Carbon Emacs problem with mouse-2
  2004-09-21 14:16 ` YAMAMOTO Mitsuharu
@ 2004-09-21 15:07   ` Piet van Oostrum
       [not found]   ` <16720.17344.80483.650163@ordesa.cs.uu.nl>
  1 sibling, 0 replies; 4+ messages in thread
From: Piet van Oostrum @ 2004-09-21 15:07 UTC (permalink / raw)


>>>>> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> (YM) wrote:

>>>>> On Tue, 21 Sep 2004 14:36:51 +0200, Piet van Oostrum <piet@cs.uu.nl> said:
>> When I click with the mouse wheel button, only a 'down-mouse-2'
>> event is generated rather than a combo 'down-mouse-2 mouse-2' as it
>> happens with mouse-3.

YM> Could you test the following patch?  I can't test it because I don't
YM> have a wheel mouse.

Strangely enough it works sometimes, but not always. Actually most of
the time it doesn't.
For example, when typing this message I did C-h k and clicked the
mouse wheel. I had to click 3 times before it reacted and then I got:

<mouse-2> (translated from <down-mouse-2> <down-mouse-2> <mouse-2>) at
that spot....

-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: piet@vanoostrum.org

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

* Re: Mac OS X Carbon Emacs problem with mouse-2
       [not found]     ` <wlbrfyk91t.wl@church.math.s.chiba-u.ac.jp>
@ 2004-09-22 10:46       ` Piet van Oostrum
  0 siblings, 0 replies; 4+ messages in thread
From: Piet van Oostrum @ 2004-09-22 10:46 UTC (permalink / raw)
  Cc: emacs-devel

Sorry about the confusion. The problem disappeared after rebooting the
computer. Apparently something in the OS got weird at approximately
the same time I installed the new Emacs.
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: piet@vanoostrum.org

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

end of thread, other threads:[~2004-09-22 10:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-21 12:36 Mac OS X Carbon Emacs problem with mouse-2 Piet van Oostrum
2004-09-21 14:16 ` YAMAMOTO Mitsuharu
2004-09-21 15:07   ` Piet van Oostrum
     [not found]   ` <16720.17344.80483.650163@ordesa.cs.uu.nl>
     [not found]     ` <wlbrfyk91t.wl@church.math.s.chiba-u.ac.jp>
2004-09-22 10:46       ` Piet van Oostrum

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