[GRASS-dev] Re: [GRASS GIS] #1187: TclTk digitizer does not recognize right-click

GRASS GIS trac at osgeo.org
Tue Nov 30 07:23:34 EST 2010


#1187: TclTk digitizer does not recognize right-click
---------------------------------------------+------------------------------
 Reporter:  cmbarton                         |       Owner:  grass-dev@…              
     Type:  defect                           |      Status:  new                      
 Priority:  critical                         |   Milestone:  6.4.1                    
Component:  Tcl/Tk                           |     Version:  6.4.0                    
 Keywords:  digitizer, v.digit, right-click  |    Platform:  MacOSX                   
      Cpu:  OSX/Intel                        |  
---------------------------------------------+------------------------------

Comment(by marisn):

 Replying to [comment:11 cmbarton]:
 >
 > I did a puts %b and the mouse is registering correctly in TclTk. The
 problem lies in c_update_tool. That is where the buttons are getting
 switched.

 c_update_tool is not touching button number, it's just passing it as-is to
 registered tool update function. Tool decides what kind of action to take
 depending on button number 1, 2 or 3. I.e. line.c @210 has defined 1=new
 point; 2=Undo; 3=quit.

 You can rearrange buttons or keys in any order as long as it results in
 sending correct button number to c_update_tool function.

 You can test Your TCL/windowing system mouse button order by launching
 wish from CLI and executing:
 {{{
 bind . <ButtonPress> { puts "Plain %b" }
 }}}
 On my GNU/Linux system it gives: 1=left; 2=middle; 3=right.

 As I wrote, more complex bindings (i.e. double click) are tricky as we
 then have to delay single click event some ms before firing to detect
 double/tripple/... click. This was a case for KDE some time a go and got
 removed to make UI more responsive, as there are no more few ms delays on
 every mouse click.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1187#comment:12>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list