[Kde-cygwin-cvs] CVS: qt-3/src/kernel qapplication_win.cpp,1.1.2.30.2.81,1.1.2.30.2.82
Status: Inactive
Brought to you by:
habacker
From: Christian E. <che...@us...> - 2005-07-17 14:10:37
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11773/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qapplication_win.cpp Log Message: huge change in mouse handling (from qt4) cleanup + astyle Index: qapplication_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v retrieving revision 1.1.2.30.2.81 retrieving revision 1.1.2.30.2.82 diff -u -r1.1.2.30.2.81 -r1.1.2.30.2.82 --- qapplication_win.cpp 12 Jul 2005 18:26:54 -0000 1.1.2.30.2.81 +++ qapplication_win.cpp 17 Jul 2005 14:10:02 -0000 1.1.2.30.2.82 @@ -14,13 +14,10 @@ ** Copyright (C) 2004 Peter Kuemmel ** Copyright (C) 2004 Dmitriy Kazimirow ** Copyright (C) 2004, 2005 Christian Ehrlicher +** Copyright (C) 2005 Trolltech AS (parts of the source code are from qt4/gpl) ** ** This file is part of the kernel module of the Qt GUI Toolkit. ** -** This file may be distributed under the terms of the Q Public License -** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. -** [...1737 lines suppressed...] } break; case WM_KILLFOCUS: - if ( widget ) { - qDebug("WM_KILLFOCUS for widget 0x%08p. wParam: 0x%08p, lParam: 0x%08p", widget->winId(), wParam, lParam); + if (!QWidget::find((HWND)wParam)) { // we don't get focus, so unset it now + if (!widget->hasFocus()) // work around Windows bug after minimizing/restoring + widget = (QETWidget*)qApp->focusWidget(); + HWND focus = ::GetFocus(); + if (!widget || (focus && ::IsChild(widget->winId(), focus))) { + result = false; + } else { + widget->clearFocus(); + result = true; + } + } else { + result = false; } break; case WM_CAPTURECHANGED: |