mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 06:14:28 +08:00
Fix sentinel value for HWND on WIN32 (STR #862)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
|
|||||||
|
|
||||||
- Documentation fixes (STR #648, STR #692, STR #730, STR
|
- Documentation fixes (STR #648, STR #692, STR #730, STR
|
||||||
#744, STR #745)
|
#744, STR #745)
|
||||||
|
- Changed initializations on WIN32 (STR #862)
|
||||||
- Fl_Preferences::getUserdataPath() didn't work for
|
- Fl_Preferences::getUserdataPath() didn't work for
|
||||||
sub-groups (STR #872)
|
sub-groups (STR #872)
|
||||||
- Fixed some redraw issues on Windows XP.
|
- Fixed some redraw issues on Windows XP.
|
||||||
|
|||||||
+2
-2
@@ -1219,12 +1219,12 @@ Fl_Window *Fl_Window::current_;
|
|||||||
HDC fl_gc = 0;
|
HDC fl_gc = 0;
|
||||||
// the current window handle, initially set to -1 so we can correctly
|
// the current window handle, initially set to -1 so we can correctly
|
||||||
// allocate fl_GetDC(0)
|
// allocate fl_GetDC(0)
|
||||||
HWND fl_window = (HWND)-1;
|
HWND fl_window = NULL;
|
||||||
|
|
||||||
// Here we ensure only one GetDC is ever in place.
|
// Here we ensure only one GetDC is ever in place.
|
||||||
HDC fl_GetDC(HWND w) {
|
HDC fl_GetDC(HWND w) {
|
||||||
if (fl_gc) {
|
if (fl_gc) {
|
||||||
if (w == fl_window) return fl_gc;
|
if (w == fl_window && fl_window != NULL) return fl_gc;
|
||||||
ReleaseDC(fl_window, fl_gc);
|
ReleaseDC(fl_window, fl_gc);
|
||||||
}
|
}
|
||||||
fl_gc = GetDC(w);
|
fl_gc = GetDC(w);
|
||||||
|
|||||||
Reference in New Issue
Block a user