# # Machekku Tool Window Minimize Fix for Windows # # Version: 0.1 # Date: 2005-06-17 # # http://machekku.uaznia.net/jabber/psi/patches/ # # mainwin.cpp | 16 ++++++++++++++++ # mainwin.h | 3 +++ # 2 files changed, 19 insertions(+) # diff -X exclude -Naru psi_cvs-2005.06.17/psi/src/mainwin.cpp psi/psi/src/mainwin.cpp --- psi_cvs-2005.06.17/psi/src/mainwin.cpp Wed Jun 8 17:56:50 2005 +++ psi/psi/src/mainwin.cpp Fri Jun 17 17:41:08 2005 @@ -46,6 +46,10 @@ #include"mainwin_p.h" +#ifdef Q_WS_WIN + #include +#endif + using namespace XMPP; // deletes submenus in a popupmenu @@ -856,6 +860,18 @@ QWidget::keyPressEvent(e); } + +#ifdef Q_WS_WIN +bool MainWin::winEvent(MSG *msg) +{ + if ( d->asTool && msg->message == WM_SYSCOMMAND && msg->wParam == SC_MINIMIZE ) { + hide(); + return true; // don't let Qt process this event + } + + return false; +} +#endif void MainWin::updateCaption() { diff -X exclude -Naru psi_cvs-2005.06.17/psi/src/mainwin.h psi/psi/src/mainwin.h --- psi_cvs-2005.06.17/psi/src/mainwin.h Sun Feb 13 17:53:48 2005 +++ psi/psi/src/mainwin.h Fri Jun 17 17:46:02 2005 @@ -65,6 +65,9 @@ protected: void closeEvent(QCloseEvent *); void keyPressEvent(QKeyEvent *); +#ifdef Q_WS_WIN + bool winEvent(MSG *); +#endif signals: void statusChanged(int);