diff --git a/CHANGES b/CHANGES index 02d643808..1887b5ffc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ CHANGES IN FLTK 1.1.0b9 + - Better FL_LEAVE event handling for WIN32. + - The alpha mask was bit-reversed. - Fl::scheme() applied the scheme tile image to overlay and menu windows, which caused problems when the overlay planes were in use. diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H index cd696e8f2..95a465278 100644 --- a/FL/Fl_Image.H +++ b/FL/Fl_Image.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Image.H,v 1.5.2.3.2.10 2002/01/01 15:11:27 easysw Exp $" +// "$Id: Fl_Image.H,v 1.5.2.3.2.11 2002/01/07 20:40:02 easysw Exp $" // // Image header file for the Fast Light Tool Kit (FLTK). // @@ -35,6 +35,10 @@ class FL_EXPORT Fl_Image { int w_, h_, d_, ld_, count_; const char * const *data_; + // Forbid use of copy contructor and assign operator + Fl_Image & operator=(const Fl_Image &); + Fl_Image(const Fl_Image &); + protected: void w(int W) {w_ = W;} @@ -91,5 +95,5 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image { #endif // -// End of "$Id: Fl_Image.H,v 1.5.2.3.2.10 2002/01/01 15:11:27 easysw Exp $". +// End of "$Id: Fl_Image.H,v 1.5.2.3.2.11 2002/01/07 20:40:02 easysw Exp $". // diff --git a/configure.in b/configure.in index ef903aef4..df2869ca6 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl -*- sh -*- dnl the "configure" script is made from this by running GNU "autoconf" dnl -dnl "$Id: configure.in,v 1.33.2.31.2.46 2002/01/06 13:40:27 easysw Exp $" +dnl "$Id: configure.in,v 1.33.2.31.2.47 2002/01/07 20:40:02 easysw Exp $" dnl dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl @@ -135,7 +135,7 @@ AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [defau DSOLINK="-Wl,-rpath,$libdir" fi ;; - FreeBSD* | NetBSD* | OpenBSD* | Linux*) + Linux*) DSONAME="libfltk.so.$FL_API_VERSION" GLDSONAME="libfltk_gl.so.$FL_API_VERSION" DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o" @@ -546,7 +546,7 @@ if test -n "$GXX"; then AC_MSG_RESULT(no)) fi else - case `(uname) 2>/dev/null` in + case "$uname" in IRIX*) # Running some flavor of IRIX; see which version and # set things up according... @@ -634,5 +634,5 @@ AC_OUTPUT(makeinclude fltk.list fltk-config FL/Makefile) chmod +x fltk-config dnl -dnl End of "$Id: configure.in,v 1.33.2.31.2.46 2002/01/06 13:40:27 easysw Exp $". +dnl End of "$Id: configure.in,v 1.33.2.31.2.47 2002/01/07 20:40:02 easysw Exp $". dnl diff --git a/src/Fl_GIF_Image.cxx b/src/Fl_GIF_Image.cxx index 2c518f9e8..5bd20d37e 100644 --- a/src/Fl_GIF_Image.cxx +++ b/src/Fl_GIF_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_GIF_Image.cxx,v 1.1.2.9 2002/01/01 15:11:30 easysw Exp $" +// "$Id: Fl_GIF_Image.cxx,v 1.1.2.10 2002/01/07 20:40:02 easysw Exp $" // // Fl_GIF_Image routines. // @@ -173,7 +173,8 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { Interlace = ((ch & 0x40) != 0); if (ch&0x80) { // read local color map - int n = 1<<((ch&7)+1); // does this replace ColorMapSize ?? + int n = 2<<(ch&7); + if (n > ColorMapSize) ColorMapSize = n; for (i=0; i < n; i++) { Red[i] = NEXTBYTE; Green[i] = NEXTBYTE; @@ -261,7 +262,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { while (i >= ColorMapSize) {*tp++ = Suffix[i]; i = Prefix[i];} *tp++ = FinChar = i; - while (tp > OutCode) { + do { *p++ = *--tp; if (p >= eol) { if (!Interlace) YC++; @@ -275,7 +276,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { p = Image + YC*Width; eol = p+Width; } - } + } while (tp > OutCode); if (OldCode != ClearCode) { Prefix[FreeCode] = OldCode; @@ -373,5 +374,5 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { // -// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.9 2002/01/01 15:11:30 easysw Exp $". +// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.10 2002/01/07 20:40:02 easysw Exp $". // diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 785b5d86d..199283f07 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Image.cxx,v 1.5.2.3.2.14 2002/01/03 08:08:21 matthiaswm Exp $" +// "$Id: Fl_Image.cxx,v 1.5.2.3.2.15 2002/01/07 20:40:02 easysw Exp $" // // Image drawing code for the Fast Light Tool Kit (FLTK). // @@ -69,6 +69,7 @@ void Fl_Image::label(Fl_Menu_Item* m) { Fl_RGB_Image::~Fl_RGB_Image() { if (id) fl_delete_offscreen((Fl_Offscreen)id); + if (mask) fl_delete_bitmask(mask); if (alloc_array) delete[] (uchar *)array; } @@ -319,12 +320,12 @@ void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) { memset(bitmap, 0, bmw * h()); for (dataptr = array + d() - 1, y = 0; y < h(); y ++, dataptr += ld()) - for (bitptr = bitmap + y * bmw, bit = 128, x = 0; x < w(); x ++, dataptr += d()) { + for (bitptr = bitmap + y * bmw, bit = 1, x = 0; x < w(); x ++, dataptr += d()) { if (*dataptr > dither[x & 15][y & 15]) *bitptr |= bit; - if (bit > 1) bit >>= 1; + if (bit < 128) bit <<= 1; else { - bit = 128; + bit = 1; bitptr ++; } } @@ -378,5 +379,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) { // -// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.14 2002/01/03 08:08:21 matthiaswm Exp $". +// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.15 2002/01/07 20:40:02 easysw Exp $". // diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx index 394d673aa..aaa8ff69e 100644 --- a/src/Fl_Widget.cxx +++ b/src/Fl_Widget.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.13 2002/01/01 15:11:31 easysw Exp $" +// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.14 2002/01/07 20:40:02 easysw Exp $" // // Base widget class for the Fast Light Tool Kit (FLTK). // @@ -126,7 +126,7 @@ extern void fl_throw_focus(Fl_Widget*); // in Fl_x.cxx // However, it is only legal to destroy a "root" such as an Fl_Window, // and automatic destructors may be called. Fl_Widget::~Fl_Widget() { - if (parent_) parent_ = 0; + parent_ = 0; // Don't throw focus to a parent widget. fl_throw_focus(this); } @@ -248,5 +248,5 @@ int Fl_Widget::contains(const Fl_Widget *o) const { } // -// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.13 2002/01/01 15:11:31 easysw Exp $". +// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.14 2002/01/07 20:40:02 easysw Exp $". // diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 2e750986b..ebc53a1a3 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.33.2.37.2.13 2002/01/03 18:28:36 easysw Exp $" +// "$Id: Fl_win32.cxx,v 1.33.2.37.2.14 2002/01/07 20:40:02 easysw Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -41,6 +41,7 @@ # include #else # include +//# include #endif #include @@ -527,13 +528,25 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar case WM_RBUTTONDOWN: mouse_event(window, 0, 3, wParam, lParam); return 0; case WM_RBUTTONDBLCLK:mouse_event(window, 1, 3, wParam, lParam); return 0; case WM_RBUTTONUP: mouse_event(window, 2, 3, wParam, lParam); return 0; - case WM_MOUSEMOVE: mouse_event(window, 3, 0, wParam, lParam); return 0; -#ifdef WM_MOUSELEAVE + case WM_MOUSEMOVE: + if (Fl::belowmouse() != window) { + TRACKMOUSEEVENT tme; + + tme.cbSize = sizeof(TRACKMOUSEEVENT); + tme.dwFlags = TME_LEAVE; + tme.hwndTrack = hWnd; + + TrackMouseEvent(&tme); + } + + mouse_event(window, 3, 0, wParam, lParam); + return 0; + case WM_MOUSELEAVE: - Fl::handle(FL_LEAVE, window); + Fl::belowmouse(0); +// Fl::handle(FL_LEAVE, window); break; -#endif /* WM_MOUSELEAVE */ case WM_SETFOCUS: Fl::handle(FL_FOCUS, window); @@ -1035,5 +1048,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.13 2002/01/03 18:28:36 easysw Exp $". +// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.14 2002/01/07 20:40:02 easysw Exp $". //