# HG changeset patch # User Rik # Date 1427825926 25200 # Node ID 91e2212b060d3c64d9cd8bb26f7820729517b461 # Parent abf348f41759a47c6b2c829281ba0f9870fbfa04 Fix FLTK SelectionType for Middle Button and double clicks (bug #44669). * __init_fltk__.cc (handle): Check event for FL_MIDDLE_BUTTON and return "extend" if found. Use Fl::event_clicks to check for double click before any other button processing and return "open" if found. diff -r abf348f41759 -r 91e2212b060d libinterp/dldfcn/__init_fltk__.cc --- a/libinterp/dldfcn/__init_fltk__.cc Mon Mar 30 20:31:11 2015 -0700 +++ b/libinterp/dldfcn/__init_fltk__.cc Tue Mar 31 11:18:46 2015 -0700 @@ -1454,15 +1454,16 @@ set_currentpoint (pos_x, pos_y); - if (Fl::event_button () == FL_LEFT_MOUSE - && Fl::event_shift ()) + if (Fl::event_clicks ()) + fp.set_selectiontype ("open"); + else if (Fl::event_button () == FL_MIDDLE_MOUSE + || (Fl::event_button () == FL_LEFT_MOUSE + && Fl::event_shift ())) fp.set_selectiontype ("extend"); - else if ((Fl::event_button () == FL_LEFT_MOUSE - && Fl::event_ctrl ()) - || Fl::event_button () == FL_RIGHT_MOUSE) + else if (Fl::event_button () == FL_RIGHT_MOUSE + || (Fl::event_button () == FL_LEFT_MOUSE + && Fl::event_ctrl ())) fp.set_selectiontype ("alt"); - else if (Fl::event_clicks ()) - fp.set_selectiontype ("open"); else fp.set_selectiontype ("normal");