Mercurial > hg > octave-nkf
changeset 16785:3d981b47be42
Return button information for ginput when using FLTK (bug #32178)
* libinterp/dldfcn/__init_fltk__.cc(handle): Call execute_windowbuttondownfcn with
Fl::event_button() so that data is returned.
* scripts/plot/private/__fltk_ginput__.m: Pass button data back, rather than always
initializing to 1 (left mouse button).
author | Rik <rik@octave.org> |
---|---|
date | Thu, 20 Jun 2013 10:55:45 -0700 |
parents | 0fabe0f49f38 |
children | 0e75f5412f1e |
files | libinterp/dldfcn/__init_fltk__.cc scripts/plot/private/__fltk_ginput__.m |
diffstat | 2 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/__init_fltk__.cc +++ b/libinterp/dldfcn/__init_fltk__.cc @@ -1286,7 +1286,7 @@ set_axes_currentpoint (ax_obj, pos_x, pos_y); } - fp.execute_windowbuttondownfcn (); + fp.execute_windowbuttondownfcn (Fl::event_button()); if (Fl::event_button () == 1 || Fl::event_button () == 3) return 1;
--- a/scripts/plot/private/__fltk_ginput__.m +++ b/scripts/plot/private/__fltk_ginput__.m @@ -85,9 +85,7 @@ function ginput_windowbuttondownfcn (src, data) point = get (get (src,"currentaxes"), "currentpoint"); - ## FIXME -- How to get the actual mouse button pressed (1,2,3) into - ## "button"? - button = 1; + button = data; ginput_aggregator (1, point(1,1), point(2,1), button); endfunction