@@ -47,6 +47,11 @@ $asciio->setup($setup_paths) ;
4747$asciio -> set_title($title ) if defined $title ;
4848
4949STDERR -> autoflush(1) ;
50+
51+ # open my $fh, ">&=", 5 or die "can't open fh 5: $!\n" ;
52+ # $fh->autoflush(1) ;
53+ # $asciio->{ACTION_VERBOSE} = sub { $counter++ ; print $fh "$counter - $_[0]\n" ; } ;
54+
5055# $asciio->{ACTION_VERBOSE} = sub { print STDERR "\e[?25l\e[H" ."$_[0]\n" ; } ;
5156# $asciio->{ACTION_VERBOSE} = sub { ; } ;
5257
@@ -93,17 +98,22 @@ while (1)
9398 $last_mouse_update = $float_seconds ;
9499
95100 my ($ev , $button , $line , $col ) = $tk -> interpret_mouse( $key );
96-
97101 my $modifiers = ' ' ;
98102
99103 $modifiers .= $key -> modifier_ctrl ? ' C' : ' 0' ;
100104 $modifiers .= $key -> modifier_alt ? ' A' : ' 0' ;
101105 $modifiers .= ' 0' ; # shift blocks mouse events
102106
103- $asciio -> motion_notify_event($modifiers , $button , $col - 1, $line - 1) if ($ev == 3) ; # 3 ?
104107 $asciio -> motion_dragging_event($modifiers , $button , $col - 1, $line - 1) if ($ev == MOUSE_DRAG) ;
105- $asciio -> button_press_event($modifiers , $button , $col - 1, $line - 1) if ($ev == MOUSE_PRESS) ;
106- $asciio -> button_release_event($modifiers , $button , $col - 1, $line - 1) if ($ev == MOUSE_RELEASE) ;
108+ $asciio -> button_press_event($modifiers , $button , $col - 1, $line - 1) if ($ev == MOUSE_PRESS) ;
109+
110+ # mmouse release or moved without a key pressed ?
111+ if ($ev == MOUSE_RELEASE)
112+ {
113+ $asciio -> motion_notify_event($modifiers , $button , $col - 1, $line - 1) ;
114+ $asciio -> update_display() if $asciio -> {DRAGGING } ;
115+ }
116+
107117 # $asciio->button_scroll_event($modifiers, $button, $col - 1, $line - 1) if ($ev == MOUSE_???) ;
108118 }
109119 }
0 commit comments