diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2005-11-04 08:23:20 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2005-11-04 08:23:20 +0000 |
| commit | 4663981310facfc5ec78adc05bc1606deb696c38 (patch) | |
| tree | a6d24745eab0a7fdd2317af02eb15d8ab6a37a12 /src/fl_cursor.cxx | |
| parent | fa517add2ed4f5d08e5023c998ff7965e18f61e4 (diff) | |
STR #1061: fixed Fl_Window::cursor for subwindows and GL windows on WIN32
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4634 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_cursor.cxx')
| -rw-r--r-- | src/fl_cursor.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fl_cursor.cxx b/src/fl_cursor.cxx index 06d9858c8..651c098d5 100644 --- a/src/fl_cursor.cxx +++ b/src/fl_cursor.cxx @@ -59,8 +59,13 @@ void Fl_Window::default_cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) { # define IDC_HAND MAKEINTRESOURCE(32649) # endif // !IDC_HAND -void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) { +void Fl_Window::cursor(Fl_Cursor c, Fl_Color c1, Fl_Color c2) { if (!shown()) return; + // the cursor must be set for the top level window, not for subwindows + Fl_Window *w = window(), *toplevel = this; + while (w) { toplevel = w; w = w->window(); } + if (toplevel != this) { toplevel->cursor(c, c1, c2); return; } + // now set the actual cursor if (c == FL_CURSOR_DEFAULT) { c = cursor_default; } |
