diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_win32.cxx | 9 | ||||
| -rw-r--r-- | src/fl_color_win32.cxx | 18 |
2 files changed, 21 insertions, 6 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index f44cd57a8..2b6ba8061 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.3 2001/08/03 15:48:20 easysw Exp $" +// "$Id: Fl_win32.cxx,v 1.33.2.37.2.4 2001/09/30 12:42:32 easysw Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -425,6 +425,9 @@ extern HPALETTE fl_select_palette(void); // in fl_color_win32.C static Fl_Window* resize_bug_fix; +extern void fl_save_pen(void); +extern void fl_restore_pen(void); + static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { // Matt: When dragging a full window, MSWindows on 'slow' @@ -477,7 +480,9 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar // is deferred until Fl::flush() is called during idle. However Win32 // apparently is very unhappy if we don't obey it and draw right now. // Very annoying! + fl_save_pen(); i->flush(); + fl_restore_pen(); window->clear_damage(); // This convinces MSWindows we have painted whatever they wanted // us to paint, and stops it from sending WM_PAINT messages: @@ -993,5 +998,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.3 2001/08/03 15:48:20 easysw Exp $". +// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.4 2001/09/30 12:42:32 easysw Exp $". // diff --git a/src/fl_color_win32.cxx b/src/fl_color_win32.cxx index 7156b4ac4..b0549e91a 100644 --- a/src/fl_color_win32.cxx +++ b/src/fl_color_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_color_win32.cxx,v 1.14.2.3 2001/01/22 15:13:40 easysw Exp $" +// "$Id: fl_color_win32.cxx,v 1.14.2.3.2.1 2001/09/30 12:42:33 easysw Exp $" // // WIN32 color functions for the Fast Light Tool Kit (FLTK). // @@ -47,8 +47,18 @@ Fl_XMap fl_xmap[256]; Fl_XMap* fl_current_xmap; HPALETTE fl_palette; -HPEN tmppen=0; -HBRUSH tmpbrush=0; +static HPEN tmppen=0; +static HBRUSH tmpbrush=0; +static HPEN savepen=0; + +void fl_save_pen(void) { + if(!tmppen) tmppen = CreatePen(PS_SOLID, 1, 0); + savepen = (HPEN)SelectObject(fl_gc, tmppen); +} + +void fl_restore_pen(void) { + SelectObject(fl_gc, savepen); +} static void clear_xmap(Fl_XMap& xmap) { if (xmap.pen) { @@ -206,5 +216,5 @@ fl_select_palette(void) #endif // -// End of "$Id: fl_color_win32.cxx,v 1.14.2.3 2001/01/22 15:13:40 easysw Exp $". +// End of "$Id: fl_color_win32.cxx,v 1.14.2.3.2.1 2001/09/30 12:42:33 easysw Exp $". // |
