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

 
 

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

Submitter:  Hartmut <hardy>
Submitted:  Mon 02 Jun 2014 01:22:31 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lostbard
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 18 Jun 2014 12:58:54 AM UTC, comment #5: 
John Donoghue <lostbard>
Group Member
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>
Group Member
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>
Group Member
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>
Group 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:


graphics_toolkit('gnuplot');
%graphics_toolkit('fltk');
close all;
figure(1);
plot(1:10);
[x,y,b]=ginput(1);
b


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 Files:
   
   
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
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by hardy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-06-19 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-06-18 lostbard StatusPatch Submitted Ready For Test
        Assigned toNone lostbard
    2014-06-17 lostbard Attached File- Added ginputfix.patch, #31573
        StatusConfirmed Patch Submitted
    2014-06-03 philipnienhuis StatusNone Confirmed
        Release3.8.1 dev

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code