diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2009-04-12 20:00:45 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2009-04-12 20:00:45 +0000 |
| commit | ead9c2ce24c88523ebe9295015f993231a61b66a (patch) | |
| tree | 832c58415cf65e6017d0ebc777f8edee40e2e95e /src/Fl_File_Input.cxx | |
| parent | afe1b90dd012216b007112dc5c92f22a1f034bd7 (diff) | |
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
Diffstat (limited to 'src/Fl_File_Input.cxx')
| -rw-r--r-- | src/Fl_File_Input.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
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; } } |
