diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-01-07 20:40:02 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-01-07 20:40:02 +0000 |
| commit | bccdafdaef5fdf69628984d8f6953145bc831a53 (patch) | |
| tree | 8e2edbab6fedf1893463a8b4b8f69f8643082f3a /src | |
| parent | a55363086d594e4df9573144b493da87b667fd27 (diff) | |
Fixed from Teun.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1919 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_GIF_Image.cxx | 11 | ||||
| -rw-r--r-- | src/Fl_Image.cxx | 11 | ||||
| -rw-r--r-- | src/Fl_Widget.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_win32.cxx | 25 |
4 files changed, 34 insertions, 19 deletions
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 <unistd.h> #else # include <winsock.h> +//# include <winuser.h> #endif #include <ctype.h> @@ -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 $". // |
