summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qapplication_win.cpp2
-rw-r--r--src/gui/util/qsystemtrayicon_win.cpp11
2 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 76a3b1e..b2cde4d 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -1808,6 +1808,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
case APPCOMMAND_VOLUME_UP:
key = Qt::Key_VolumeUp;
break;
+#if defined(WINVER) && WINVER >= 0x0501
// Commands new in Windows XP
case APPCOMMAND_HELP:
key = Qt::Key_Help;
@@ -1821,6 +1822,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
case APPCOMMAND_MEDIA_PLAY:
key = Qt::Key_MediaPlay;
break;
+#endif
default:
break;
}
diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp
index ea7fbde..56872ac 100644
--- a/src/gui/util/qsystemtrayicon_win.cpp
+++ b/src/gui/util/qsystemtrayicon_win.cpp
@@ -132,12 +132,15 @@ QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object)
: hIcon(0), q(object), ignoreNextMouseRelease(false)
{
-#ifndef Q_OS_WINCE
- notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, guidItem); // NOTIFYICONDATAW_V2_SIZE;
- maxTipLength = 128;
-#else
+#ifdef Q_OS_WINCE
notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, szTip[64]); // NOTIFYICONDATAW_V1_SIZE;
maxTipLength = 64;
+#elif WINVER <= 0x0500
+ notifyIconSize = sizeof(NOTIFYICONDATA);
+ maxTipLength = 64;
+#else
+ notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, guidItem); // NOTIFYICONDATAW_V2_SIZE;
+ maxTipLength = 128;
#endif
// For restoring the tray icon after explorer crashes