diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-02-11 13:36:11 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-02-11 13:50:47 (GMT) |
commit | ebfb42a9ada20c93643b05ebbb73709bd639742d (patch) | |
tree | 4aa700da62790e91925d6fdf5e685d997ce499a3 /src/gui/kernel/qapplication_win.cpp | |
parent | 638b4edeba905facb2ae7a841214b048c0010008 (diff) | |
download | Qt-ebfb42a9ada20c93643b05ebbb73709bd639742d.zip Qt-ebfb42a9ada20c93643b05ebbb73709bd639742d.tar.gz Qt-ebfb42a9ada20c93643b05ebbb73709bd639742d.tar.bz2 |
Wrong cursor shown by the parent window after setOverrideCursor().
When calling QApplication::setOverrideCursor() and then showing a modal
dialog, the parent window of the dialog reverts to the default cursor.
At this point the parent window is in a disabled state, Windows uses the
default cursor for the class. We need to override this behavior by
handling WM_SETCURSOR.
Task-number: QTBUG-6525
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src/gui/kernel/qapplication_win.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_win.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 3355272..2c6e246 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -2547,6 +2547,17 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam result = true; break; } +#ifndef QT_NO_CURSOR + case WM_SETCURSOR: { + QCursor *ovr = QApplication::overrideCursor(); + if (ovr) { + SetCursor(ovr->handle()); + RETURN(TRUE); + } + result = false; + break; + } +#endif default: result = false; // event was not processed break; |