From ead9c2ce24c88523ebe9295015f993231a61b66a Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 12 Apr 2009 20:00:45 +0000 Subject: Avoiding crashes for recrsive common dialogs (this does not fix the issue at hand yet) (STR #1986, 2150) / Added menu shortcut alignment for OS X / Fixed bad system menu hadling in OS X (STR #2153) / Fixed File Input mouse pointer dragging (STR #2181) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Input.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Fl_File_Input.cxx') diff --git a/src/Fl_File_Input.cxx b/src/Fl_File_Input.cxx index 8760e3436..5f329904d 100644 --- a/src/Fl_File_Input.cxx +++ b/src/Fl_File_Input.cxx @@ -191,6 +191,7 @@ int // O - TRUE if we handled event Fl_File_Input::handle(int event) // I - Event { // printf("handle(event = %d)\n", event); + static char inButtonBar = 0; switch (event) { case FL_MOVE : @@ -203,18 +204,19 @@ Fl_File_Input::handle(int event) // I - Event return 1; case FL_PUSH : + inButtonBar = (Fl::event_y() < (y() + DIR_HEIGHT)); case FL_RELEASE : case FL_DRAG : - if (Fl::event_y() < (y() + DIR_HEIGHT) || pressed_ >= 0) return handle_button(event); - - return Fl_Input::handle(event); + if (inButtonBar) + return handle_button(event); + else + return Fl_Input::handle(event); default : if (Fl_Input::handle(event)) { damage(FL_DAMAGE_BAR); return 1; } - return 0; } } -- cgit v1.2.3