Before you commit this you best make sure that ContinuousMouse can be
turned off.

I fixed a bug in my NetrekNT source fork a while back where
continuousMouse was not listening to the featurespackets from the
server.  It was simply enabling it by default.

Well I thought this sucked, because I don't like continuousmouse and had
no way to turn it off.  So I made sure it responded to the features
packet correctly, and also responded to the netrekrc default setting.

For people who are not used to the behavior of continuousmouse, it is
extremely frustrating to play with it on.

> -----Original Message-----
> From: vanilla-list-admin at us.netrek.org 
> [mailto:vanilla-list-admin at us.netrek.org] On Behalf Of Gerard Lim
> Sent: Friday, December 07, 2001 9:23 PM
> To: vanilla-list at us.netrek.org
> Subject: [Vanilla List] continuousMouse
> 
> 
> There's been a feature that's missing in the UNIX version of 
> COW that is present in the win32 version, which is support 
> for continuousMouse (ie. if you press a mouse button and keep 
> it down, it will behave as if you have pressed it multiple times).
> 
> 
> I've found the cause, which is shown in the diff below.  
> Basically if a MouseMotionEvent occurs, it wasn't checking 
> the right event (it was checking 'button', which is a 
> MouseButtonEvent (ie for mouse clicks, but not movement).  
> The right event is 'motion'.
> 
> Also, I took out some dead code (it seems to be useless) from 
> input.c::buttonaction(), which returns without processing the event 
> if the event type is W_EV_CM_BUTTON (a mouse motion event), 
> this prevented the correct processing of motion events, since 
> it returns without doing anything.
> 
> If it's ok with everyone I would like to commit this. (PLEASE 
> so I don't have to reboot to windows every time I want to trek ;))
> 
> gerard
> 
> 
> 
> 
> Index: input.c 
> ===================================================================
> RCS file: /cvsroot/netrek/client/cow/input.c,v
> retrieving revision 1.7
> diff -c -r1.7 input.c
> *** input.c	2001/08/21 20:52:15	1.7
> --- input.c	2001/12/08 03:05:12
> ***************
> *** 1192,1204 ****
>   	}
>       }
>   
> - #ifdef MOTION_MOUSE
> -   if ((data->type == W_EV_CM_BUTTON) &&		 /* KOC 
> - 10/18/95     */
> -       (!motion_mouse_enablable) &&		 /* Hack for    
>         */
> -       (data->key != W_RBUTTON))			 /* 
> continuous_steer    */
> -     return;
> - #endif
> - 
>     if (data->Window == infow)
>       {
>         int     x, y;
> --- 1192,1197 ----
> Index: x11window.c 
> ===================================================================
> RCS file: /cvsroot/netrek/client/cow/x11window.c,v
> retrieving revision 1.5
> diff -c -r1.5 x11window.c
> *** x11window.c	2001/08/21 20:52:15	1.5
> --- x11window.c	2001/12/08 03:05:21
> ***************
> *** 1606,1639 ****
>   	      }
>   #endif
>   
> ! 	  switch (button->button & 0xf)
>   	    {
> ! 	    case Button3:
>   	      wevent->key = W_RBUTTON;
>   	      break;
> ! 	    case Button1:
>   	      wevent->key = W_LBUTTON;
>   	      break;
> ! 	    case Button2:
>   	      wevent->key = W_MBUTTON;
>   	      break;
>   #ifdef Button4
> ! 	    case Button4:
>   	      wevent->key = W_WUBUTTON;
>   	      break;
>   #endif
>   #ifdef Button5
> ! 	    case Button5:
>   	      wevent->key = W_WDBUTTON;
>   	      break;
>   #endif
>   #ifdef Button6
> ! 	    case Button6:
>   	      wevent->key = W_X1BUTTON;
>   	      break;
>   #endif
>   #ifdef Button7
> ! 	    case Button7:
>   	      wevent->key = W_X2BUTTON;
>   	      break;
>   #endif
> --- 1606,1639 ----
>   	      }
>   #endif
>   
> ! 	  switch (motion->state)
>   	    {
> ! 	    case Button3Mask:
>   	      wevent->key = W_RBUTTON;
>   	      break;
> ! 	    case Button1Mask:
>   	      wevent->key = W_LBUTTON;
>   	      break;
> ! 	    case Button2Mask:
>   	      wevent->key = W_MBUTTON;
>   	      break;
>   #ifdef Button4
> ! 	    case Button4Mask:
>   	      wevent->key = W_WUBUTTON;
>   	      break;
>   #endif
>   #ifdef Button5
> ! 	    case Button5Mask:
>   	      wevent->key = W_WDBUTTON;
>   	      break;
>   #endif
>   #ifdef Button6
> ! 	    case Button6Mask:
>   	      wevent->key = W_X1BUTTON;
>   	      break;
>   #endif
>   #ifdef Button7
> ! 	    case Button7Mask:
>   	      wevent->key = W_X2BUTTON;
>   	      break;
>   #endif
> 
> _______________________________________________
> vanilla-list mailing list
> vanilla-list at us.netrek.org 
> https://mailman.real-> time.com/mailman/listinfo/vanilla-list
> 
>