Re: [bug #14155] 4.6.1: mouse wheel strangeness

2006-02-04 Thread Roland Illig

anonymous wrote:

Follow-up Comment #7, bug #14155 (project mc):

hey everyone. ok so this problem had been bugging me too. and i see the patch
fixed it and for that I am very grateful.

but now it appears something else has broke, the situation is this;

i use Eterm for my terminal. I noticed that the function keys and the mouse
did not work with mc from Eterm, but they worked fine with xterm.

eventually how I got around this was by symlinking my Eterm binary to a file
called xterm, and then setting my enviroment variable TERM to xterm.


I have just committed a patch that adds Eterm to the list of terminals 
that understand mouse sequences. It works for me now.


Roland
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [bug #14155] 4.6.1: mouse wheel strangeness

2005-08-27 Thread Pavel Tsekov
Hello,

On Sat, 27 Aug 2005, Leonard den Ottolander wrote:

 Committed the mouse wheel no click patch, fixed the ChangeLog entry and CVS
 log entries.

 The other patch should still be reviewed.

No problem, but by whom ? I hardly see anyone interested in reviewing
patches. And of course the main concern of Roland is the viewer. Maybe
at the end mc will become the best viewer application around. Of course
this is all off topic.
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [bug #14155] 4.6.1: mouse wheel strangeness

2005-08-26 Thread Pavel Tsekov
Hello,

On Thu, 25 Aug 2005, Leonard den Ottolander wrote:

 Must be my problem as well. Sorry for the mix up. I'll fix it once you
 mail the change log entry. Plus I'll have a closer look to find the
 second patch ;) .

The two patches can be found in the section 'Attached files' at the bottom
of the bugreport page. Attaching to this mail for your convinience.

Now to the details ...

mc-xterm-mouse-wheel-fix.patch - This patch fixes the problem reported by
John Pye here:

  https://savannah.gnu.org/bugs/index.php?func=detailitemitem_id=14155

When the mouse wheel is scrolled events could be delivered too fast to
MC so that it would think that double click occured. This is why John
complains about MC changing directories. The patch fixes the problem by
resetting the `clicks' variable each time a mouse wheel event is
delivered. The `clicks' variable is used to track the number of button
press events which occured in a row and the time interval between too
adjacent events is less than `double_click_speed'. It is obviously wrong
to fire double click event on fast mouse wheel scrolling. So I think this
patch is good.


mc-xterm-mouse-enable-drag.patch - This patch enables xterm's
'Button-event tracking' mouse reporting and adds support for
generating GPM_DRAG events to xmouse_get_event()


[...]
Button-event tracking is essentially the same as normal tracking, but
xterm also reports button-motion events.  Motion events are reported only
if the mouse pointer has moved to a different character cell.  It is
enabled by specifying parameter 1002 to DECSET. On button press or
release, xterm sends the same codes used by normal tracking mode.  On
button-motion events, xterm adds 32 to the event code ...
[...]

As a consequence we get some fine features under xterm terminals which
were missing before:

  Dragging the mouse in the editor to select a block of text now
  highlights the block immediatley and not after the mouse button
  is released.

  Dragging the mouse in a panel containing file listing highlights the
  entry under the mouse cursor.

  ...

Changelog entries for the patches ...

mc-xterm-mouse-wheel-fix.patch:

2005-08-25  Pavel Tsekov  [EMAIL PROTECTED]

* key.c (xmouse_get_event): Disable double-click tracking for
mouse wheel events.

mc-xterm-mouse-enable-drag.patch

2005-08-24  Pavel Tsekov  [EMAIL PROTECTED]

* mouse.c (enable_mouse): Use xterm's 'Button-event mouse
tracking' instead of 'Normal tracking'.
* key.c (xmouse_get_event): Add support for generating GPM_DRAG
events.Index: src/key.c
===
RCS file: /cvsroot/mc/mc/src/key.c,v
retrieving revision 1.83
diff -u -p -r1.83 key.c
--- src/key.c   20 Jul 2005 20:29:08 -  1.83
+++ src/key.c   24 Aug 2005 14:07:02 -
@@ -532,9 +532,11 @@ xmouse_get_event (Gpm_Event *ev)
 break;
case 64:
 ev-buttons = GPM_B_UP;
+clicks = 0;
 break;
case 65:
 ev-buttons = GPM_B_DOWN;
+clicks = 0;
 break;
default:
 /* Nothing */
Index: src/key.c
===
RCS file: /cvsroot/mc/mc/src/key.c,v
retrieving revision 1.83
diff -u -p -r1.83 key.c
--- src/key.c   20 Jul 2005 20:29:08 -  1.83
+++ src/key.c   25 Aug 2005 12:12:27 -
@@ -512,7 +512,12 @@ xmouse_get_event (Gpm_Event *ev)
ev-type = 0;
}
 } else {
-ev-type = GPM_DOWN;
+   if (btn = 32  btn = 34) {
+   btn -= 32;
+   ev-type = GPM_DRAG;
+   } else
+   ev-type = GPM_DOWN;
+
GET_TIME (tv2);
if (tv1.tv_sec  (DIF_TIME (tv1,tv2)  double_click_speed)){
clicks++;
Index: src/mouse.c
===
RCS file: /cvsroot/mc/mc/src/mouse.c,v
retrieving revision 1.15
diff -u -p -r1.15 mouse.c
--- src/mouse.c 27 May 2005 03:35:15 -  1.15
+++ src/mouse.c 25 Aug 2005 12:12:27 -
@@ -91,7 +91,7 @@ void enable_mouse (void)
printf(ESC_STR [?1001s);
 
/* enable mouse tracking */
-   printf(ESC_STR [?1000h);
+   printf(ESC_STR [?1002h);
 
fflush (stdout);
mouse_enabled = 1; 
@@ -117,7 +117,7 @@ void disable_mouse (void)
 #endif
 case MOUSE_XTERM:
/* disable mouse tracking */
-   printf(ESC_STR [?1000l);
+   printf(ESC_STR [?1002l);
 
/* restore old highlight mouse tracking */
printf(ESC_STR [?1001r);
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [bug #14155] 4.6.1: mouse wheel strangeness

2005-08-25 Thread Pavel Tsekov
Hello,

 Update of bug #14155 (project mc):
 
   Status:  Ready For Test = Fixed
  
  Open/Closed:Open = Closed   
  
 Platform Version:GNU/Hurd = All  

Leonard you got it wrong . The Changelog entry is not for the hunk you
commited. There are two patches filed against this bugreport. The older
fixes the actual problem which is experienced by the reporter. The second
one adds GPM_DRAG support. This allows fancy things as highlighting a block
of text as you drag the mouse in the editor, or moving one entry at a time
when you drag in the panels. If you don't mind I'll write correct changelog
entries tommorow and post them to the list. Too tired now.

-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel