From 4663981310facfc5ec78adc05bc1606deb696c38 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 4 Nov 2005 08:23:20 +0000 Subject: 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 --- src/fl_cursor.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3