unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
@ 2008-08-10 20:58 Lennart Borgman (gmail)
  2008-08-11  1:06 ` OFFICE ZERO
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-10 20:58 UTC (permalink / raw)
  To: emacs-pretest-bug

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

I noticed that mouse wheel events might trigger mouse avoidance. That
seems inappropriate. The attached patch should fix that.

Please notice that I am a bit unsure about what the event names could
be. There are probably more event names than those I have entered. In
keyboard.c there is the following code:

static char *lispy_wheel_names[] =
{
   "wheel-up", "wheel-down", "wheel-left", "wheel-right"
};



In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
  of 2008-08-10


[-- Attachment #2: avoid-wheel.diff --]
[-- Type: text/plain, Size: 710 bytes --]

Index: avoid.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/avoid.el,v
retrieving revision 1.47
diff -u -r1.47 avoid.el
--- avoid.el	6 May 2008 07:57:26 -0000	1.47
+++ avoid.el	10 Aug 2008 20:42:26 -0000
@@ -289,7 +289,9 @@
 	     (let ((modifiers (event-modifiers (car last-input-event))))
 	       (or (memq (car last-input-event)
 			 '(mouse-movement scroll-bar-movement
-			   select-window switch-frame))
+			   select-window switch-frame
+                           wheel-down wheel-up double-wheel-up double-wheel-down
+                           ))
 		   (memq 'click modifiers)
 		   (memq 'double modifiers)
 		   (memq 'triple modifiers)

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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-10 20:58 Lennart Borgman (gmail)
@ 2008-08-11  1:06 ` OFFICE ZERO
  0 siblings, 0 replies; 14+ messages in thread
From: OFFICE ZERO @ 2008-08-11  1:06 UTC (permalink / raw)
  To: Lennart Borgman (gmail), 687

Do not send me any mail  !
no thank you



----- Original Message ----- 
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: <emacs-pretest-bug@gnu.org>
Sent: Monday, August 11, 2008 5:58 AM
Subject: bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance


>I noticed that mouse wheel events might trigger mouse avoidance. That
> seems inappropriate. The attached patch should fix that.
>
> Please notice that I am a bit unsure about what the event names could
> be. There are probably more event names than those I have entered. In
> keyboard.c there is the following code:
>
> static char *lispy_wheel_names[] =
> {
>   "wheel-up", "wheel-down", "wheel-left", "wheel-right"
> };
>
>
>
> In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
>  of 2008-08-10
>
>


--------------------------------------------------------------------------------


> Index: avoid.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/avoid.el,v
> retrieving revision 1.47
> diff -u -r1.47 avoid.el
> --- avoid.el 6 May 2008 07:57:26 -0000 1.47
> +++ avoid.el 10 Aug 2008 20:42:26 -0000
> @@ -289,7 +289,9 @@
>       (let ((modifiers (event-modifiers (car last-input-event))))
>         (or (memq (car last-input-event)
>  '(mouse-movement scroll-bar-movement
> -    select-window switch-frame))
> +    select-window switch-frame
> +                           wheel-down wheel-up double-wheel-up 
> double-wheel-down
> +                           ))
>     (memq 'click modifiers)
>     (memq 'double modifiers)
>     (memq 'triple modifiers)
> 







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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
@ 2008-08-12 18:46 Chong Yidong
  2008-08-12 18:55 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2008-08-12 18:46 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: 687

> I noticed that mouse wheel events might trigger mouse avoidance. That
> seems inappropriate. The attached patch should fix that.

Doesn't the code just below your change prevent mouse wheel events from
triggering avoidance?

   (memq 'click modifiers)
   ...
   (memq 'down modifiers)))))))

Do you have a recipe for reproducing the bug?






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-12 18:46 bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance Chong Yidong
@ 2008-08-12 18:55 ` Lennart Borgman (gmail)
  2008-08-12 19:02   ` Chong Yidong
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-12 18:55 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 687

Chong Yidong wrote:
>> I noticed that mouse wheel events might trigger mouse avoidance. That
>> seems inappropriate. The attached patch should fix that.
> 
> Doesn't the code just below your change prevent mouse wheel events from
> triggering avoidance?
> 
>    (memq 'click modifiers)
>    ...
>    (memq 'down modifiers)))))))
> 
> Do you have a recipe for reproducing the bug?

Not sure, but my fix does not cure the problem. I think I understand 
better how to reproduce it now:

- Move the mouse pointer while scrolling with the scroll wheel.

Can you reproduce the problem this way?






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-12 18:55 ` Lennart Borgman (gmail)
@ 2008-08-12 19:02   ` Chong Yidong
  2008-08-12 19:06     ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2008-08-12 19:02 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: 687

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Not sure, but my fix does not cure the problem. I think I understand
> better how to reproduce it now:
>
> - Move the mouse pointer while scrolling with the scroll wheel.
>
> Can you reproduce the problem this way?

I don't see anything out of the ordinary.  You're going to have to be
more specific.






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-12 19:02   ` Chong Yidong
@ 2008-08-12 19:06     ` Lennart Borgman (gmail)
  2008-08-12 19:12       ` Chong Yidong
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-12 19:06 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 687

Chong Yidong wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>> Not sure, but my fix does not cure the problem. I think I understand
>> better how to reproduce it now:
>>
>> - Move the mouse pointer while scrolling with the scroll wheel.
>>
>> Can you reproduce the problem this way?
> 
> I don't see anything out of the ordinary.  You're going to have to be
> more specific.

Ok:

   emacs -Q
   M-x mouse-avoidance-mode
   Select ...: banish
   C-x 2

Now use the scroll wheel to try to scroll the buffers while 
simultaneously moving the mouse pointer.






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-12 19:06     ` Lennart Borgman (gmail)
@ 2008-08-12 19:12       ` Chong Yidong
  2008-08-12 19:13         ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2008-08-12 19:12 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: 687

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

>>> - Move the mouse pointer while scrolling with the scroll wheel.
>>>
>>> Can you reproduce the problem this way?
>>
>> I don't see anything out of the ordinary.  You're going to have to be
>> more specific.
>
> Ok:
>
>   emacs -Q
>   M-x mouse-avoidance-mode
>   Select ...: banish
>   C-x 2
>
> Now use the scroll wheel to try to scroll the buffers while
> simultaneously moving the mouse pointer.

I don't observe anything unusual when I do this.  What am I supposed to
see?






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-12 19:12       ` Chong Yidong
@ 2008-08-12 19:13         ` Lennart Borgman (gmail)
  2008-08-12 19:15           ` Chong Yidong
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-12 19:13 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 687

Chong Yidong wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>>>> - Move the mouse pointer while scrolling with the scroll wheel.
>>>>
>>>> Can you reproduce the problem this way?
>>> I don't see anything out of the ordinary.  You're going to have to be
>>> more specific.
>> Ok:
>>
>>   emacs -Q
>>   M-x mouse-avoidance-mode
>>   Select ...: banish
>>   C-x 2
>>
>> Now use the scroll wheel to try to scroll the buffers while
>> simultaneously moving the mouse pointer.
> 
> I don't observe anything unusual when I do this.  What am I supposed to
> see?

For me the mouse pointer suddenly jumps away to its "bannished corner". 
Does not that happen for you?






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-12 19:13         ` Lennart Borgman (gmail)
@ 2008-08-12 19:15           ` Chong Yidong
  2008-08-14  0:58             ` Jason Rumney
  0 siblings, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2008-08-12 19:15 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: 687

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> For me the mouse pointer suddenly jumps away to its "bannished
> corner". Does not that happen for you?

No.

This may be a W32 bug; maybe someone on that platform can try to
reproduce it.






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-12 19:15           ` Chong Yidong
@ 2008-08-14  0:58             ` Jason Rumney
  2008-08-14  1:04               ` Chong Yidong
  2008-08-14  1:08               ` Lennart Borgman (gmail)
  0 siblings, 2 replies; 14+ messages in thread
From: Jason Rumney @ 2008-08-14  0:58 UTC (permalink / raw)
  To: Chong Yidong, 687

Chong Yidong wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>
>   
>> For me the mouse pointer suddenly jumps away to its "bannished
>> corner". Does not that happen for you?
>>     
>
> No.
>
> This may be a W32 bug; maybe someone on that platform can try to
> reproduce it.
>   

This is probably because on W32 the mouse wheel generates wheel-up and 
wheel-down events, while on X it most commonly generates mouse-4 and 
mouse-5 button events. Whatever code is filtering events from affecting 
mouse-avoidance-mode is not filtering out the wheel events.







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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-14  0:58             ` Jason Rumney
@ 2008-08-14  1:04               ` Chong Yidong
  2008-08-14  1:30                 ` Jason Rumney
  2008-08-14  1:08               ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2008-08-14  1:04 UTC (permalink / raw)
  To: Jason Rumney; +Cc: 687

Jason Rumney <jasonr@f2s.com> writes:

> Chong Yidong wrote:
>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>>
>>   
>>> For me the mouse pointer suddenly jumps away to its "bannished
>>> corner". Does not that happen for you?
>>>     
>>
>> No.
>>
>> This may be a W32 bug; maybe someone on that platform can try to
>> reproduce it.
>>   
>
> This is probably because on W32 the mouse wheel generates wheel-up and
> wheel-down events, while on X it most commonly generates mouse-4 and
> mouse-5 button events. Whatever code is filtering events from
> affecting mouse-avoidance-mode is not filtering out the wheel events.

I see.  Can you verify that Lennart's patch works on W32?






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-14  0:58             ` Jason Rumney
  2008-08-14  1:04               ` Chong Yidong
@ 2008-08-14  1:08               ` Lennart Borgman (gmail)
  2008-08-14  1:28                 ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-14  1:08 UTC (permalink / raw)
  To: Jason Rumney; +Cc: 687, Chong Yidong

Jason Rumney wrote:
> Chong Yidong wrote:
>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>>
>>  
>>> For me the mouse pointer suddenly jumps away to its "bannished
>>> corner". Does not that happen for you?
>>>     
>>
>> No.
>>
>> This may be a W32 bug; maybe someone on that platform can try to
>> reproduce it.
>>   
> 
> This is probably because on W32 the mouse wheel generates wheel-up and 
> wheel-down events, while on X it most commonly generates mouse-4 and 
> mouse-5 button events. Whatever code is filtering events from affecting 
> mouse-avoidance-mode is not filtering out the wheel events.

I just tested again with a (patched) checkout from 2008-08-13. I can not 
reproduce the problem there. (But it is still there when I check with 
the unpatched version from 2008-08-10.)

Has anyone found a solution, or?






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-14  1:08               ` Lennart Borgman (gmail)
@ 2008-08-14  1:28                 ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-14  1:28 UTC (permalink / raw)
  To: Lennart Borgman (gmail), 687; +Cc: Chong Yidong, Jason Rumney

Lennart Borgman (gmail) wrote:
> Jason Rumney wrote:
>> Chong Yidong wrote:
>>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>>>
>>>  
>>>> For me the mouse pointer suddenly jumps away to its "bannished
>>>> corner". Does not that happen for you?
>>>>     
>>>
>>> No.
>>>
>>> This may be a W32 bug; maybe someone on that platform can try to
>>> reproduce it.
>>>   
>>
>> This is probably because on W32 the mouse wheel generates wheel-up and 
>> wheel-down events, while on X it most commonly generates mouse-4 and 
>> mouse-5 button events. Whatever code is filtering events from 
>> affecting mouse-avoidance-mode is not filtering out the wheel events.
> 
> I just tested again with a (patched) checkout from 2008-08-13. I can not 
> reproduce the problem there. (But it is still there when I check with 
> the unpatched version from 2008-08-10.)
> 
> Has anyone found a solution, or?


Maybe it is because I am actually using the patch I sent ...

I hope you have get used to my temporary confusions.






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

* bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance
  2008-08-14  1:04               ` Chong Yidong
@ 2008-08-14  1:30                 ` Jason Rumney
  0 siblings, 0 replies; 14+ messages in thread
From: Jason Rumney @ 2008-08-14  1:30 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 687

Chong Yidong wrote:
> 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.







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

end of thread, other threads:[~2008-08-14  1:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-12 18:46 bug#687: 23.0.60; Mouse wheel should not trigger mouse avoidance Chong Yidong
2008-08-12 18:55 ` Lennart Borgman (gmail)
2008-08-12 19:02   ` Chong Yidong
2008-08-12 19:06     ` Lennart Borgman (gmail)
2008-08-12 19:12       ` Chong Yidong
2008-08-12 19:13         ` Lennart Borgman (gmail)
2008-08-12 19:15           ` Chong Yidong
2008-08-14  0:58             ` Jason Rumney
2008-08-14  1:04               ` Chong Yidong
2008-08-14  1:30                 ` Jason Rumney
2008-08-14  1:08               ` Lennart Borgman (gmail)
2008-08-14  1:28                 ` Lennart Borgman (gmail)
  -- strict thread matches above, loose matches on Subject: below --
2008-08-10 20:58 Lennart Borgman (gmail)
2008-08-11  1:06 ` OFFICE ZERO

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