diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-09-15 15:18:12 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-09-15 15:18:12 +0000 |
| commit | 9afb77da56efaa7fb65e1dbac0515803671e3ecb (patch) | |
| tree | edbb2897671aa919d4b417887d7dda36b3bb8878 | |
| parent | 54a6bda767ccf76473c127aa47b2d15bdc4f5491 (diff) | |
Fixed long-standing bug reported by Rick Sayre in Fl_Browser_ - if the
draw code added a horizontal scrollbar it might not add the vertical one
until the next redraw.
Added FreeBSD to the list of platforms needing the scandir function cast.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@718 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_Browser_.cxx | 22 | ||||
| -rw-r--r-- | src/filename_list.cxx | 6 |
2 files changed, 23 insertions, 5 deletions
diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx index 895e306dd..9dddd0fa9 100644 --- a/src/Fl_Browser_.cxx +++ b/src/Fl_Browser_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Browser_.cxx,v 1.10.2.2 1999/06/07 07:03:32 bill Exp $" +// "$Id: Fl_Browser_.cxx,v 1.10.2.3 1999/09/15 15:18:11 mike Exp $" // // Base Browser widget class for the Fast Light Tool Kit (FLTK). // @@ -268,6 +268,24 @@ J1: } } + // Check the vertical scrollbar again, just in case it needs to be drawn + // because the horizontal one is drawn. There should be a cleaner way + // to do this besides copying the same code... + if ((has_scrollbar_ & VERTICAL) && ( + (has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) { + if (!scrollbar.visible()) { + scrollbar.set_visible(); + drawsquare = 1; + bbox(X, Y, W, H); + } + } else { + top_ = item_first(); real_position_ = offset_ = 0; + if (scrollbar.visible()) { + scrollbar.clear_visible(); + clear_damage(damage()|FL_DAMAGE_SCROLL); + } + } + bbox(X, Y, W, H); fl_clip(X, Y, W, H); @@ -647,5 +665,5 @@ void Fl_Browser_::item_select(void*, int) {} int Fl_Browser_::item_selected(void* l) const {return l==selection_;} // -// End of "$Id: Fl_Browser_.cxx,v 1.10.2.2 1999/06/07 07:03:32 bill Exp $". +// End of "$Id: Fl_Browser_.cxx,v 1.10.2.3 1999/09/15 15:18:11 mike Exp $". // diff --git a/src/filename_list.cxx b/src/filename_list.cxx index d9412de57..9392ce29c 100644 --- a/src/filename_list.cxx +++ b/src/filename_list.cxx @@ -1,5 +1,5 @@ // -// "$Id: filename_list.cxx,v 1.10 1999/02/22 20:54:44 mike Exp $" +// "$Id: filename_list.cxx,v 1.10.2.1 1999/09/15 15:18:12 mike Exp $" // // Filename list routines for the Fast Light Tool Kit (FLTK). // @@ -40,7 +40,7 @@ extern "C" { } int filename_list(const char *d, dirent ***list) { -#if defined(_AIX) || defined(CRAY) || defined(linux) +#if defined(_AIX) || defined(CRAY) || defined(linux) || defined(__FreeBSD__) // on some systems you may need to do this, due to a rather common // error in the prototype for the sorting function, where a level // of pointer indirection is missing: @@ -55,5 +55,5 @@ int filename_list(const char *d, dirent ***list) { } // -// End of "$Id: filename_list.cxx,v 1.10 1999/02/22 20:54:44 mike Exp $". +// End of "$Id: filename_list.cxx,v 1.10.2.1 1999/09/15 15:18:12 mike Exp $". // |
