bugGNU Octave - Bugs: bug #42489, "ginput" returns wrong...

 
 

bug #42489: "ginput" returns wrong mouse button value (with gnuplot under Windows)

Submitted by:  Hartmut <hardy>
Submitted on:  Mon 02 Jun 2014 01:22:31 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: Open/Closed: Closed
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 18 Jun 2014 12:58:54 AM UTC, comment #5:

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/dd34502e5c3c

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 17 Jun 2014 04:33:51 PM UTC, comment #4:

Attached patch checks the value of MOUSE_KEY and if is 1023, uses 1 instead.

(file #31573)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 05 Jun 2014 07:53:40 PM UTC, comment #3:

On my laptop with Ubuntu 12.04 linux I always get the correct 1 as result from ginput for a left mouse button. This is using octave 3.8.1 release with gnuplot 4.6.1 (Ubuntu repository version 4.6.1-1~precise1).

Hartmut <hardy>
Thu 05 Jun 2014 12:24:56 AM UTC, comment #2:

Looking at the gnu code, the 1063 happens in the gnuplot code for a button 1 keypress when waiting for the mouse ( at least in the gnuplot 4.6.3 and 4.6.4 code ).

Related, on my fedora 20 linux machine running octave 3.9.0+, with gnuplot 4.6.3, [x,y,b]=ginput(1) returns straight away for me, with a button value of -1.

Running [x,y,b]=ginput() on my linux box, pressing the left mouse a few times and then pressing enter, I get an array of b values that are mostly -1, however see 1063 as well.

What linux and gnuplot does it work with?

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 03 Jun 2014 08:18:24 PM UTC, comment #1:

Confirmed w. 3.9.0+ and 4.1.0+ on Windows (builds from end of May)

Release -> "dev"

Philip Nienhuis <philipnienhuis>
Project Member
Mon 02 Jun 2014 01:22:31 PM UTC, original submission:

Here is how to reproduce the behavior. It happens only with gnuplot under Windows:

The third result b for a left mouse click should be 1. But with gnuplot under Windows it returns 1063.

For fltk under Windows you get the right result, as well as for fltk and gnuplot under Linux.

Hartmut <hardy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #31573:  ginputfix.patch added by lostbard (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by hardy (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 Jun 2014 10:20:03 AM UTClostbardStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 18 Jun 2014 12:58:54 AM UTClostbardStatusPatch Submitted=>Ready For Test
      Assigned toNone=>lostbard
    Tue 17 Jun 2014 04:33:51 PM UTClostbardAttached File-=>Added ginputfix.patch, #31573
      StatusConfirmed=>Patch Submitted
    Tue 03 Jun 2014 08:18:24 PM UTCphilipnienhuisStatusNone=>Confirmed
      Release3.8.1=>dev

    Back to the top


    Powered by Savane 3.1-cleanup1