From 282b4397e03cd4f71c55c06b84f2b63b54f6dd38 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 6 Mar 2018 20:41:28 +0100 Subject: [PATCH] [STOBJECT] Use double click time for the single click timers instead of a fixed timeout. --- dll/shellext/stobject/hotplug.cpp | 2 +- dll/shellext/stobject/power.cpp | 2 +- dll/shellext/stobject/volume.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/shellext/stobject/hotplug.cpp b/dll/shellext/stobject/hotplug.cpp index ed0660f49ed..1d2a58774f4 100644 --- a/dll/shellext/stobject/hotplug.cpp +++ b/dll/shellext/stobject/hotplug.cpp @@ -294,7 +294,7 @@ HRESULT STDMETHODCALLTYPE Hotplug_Message(_In_ CSysTray * pSysTray, UINT uMsg, W switch (lParam) { case WM_LBUTTONDOWN: - SetTimer(pSysTray->GetHWnd(), HOTPLUG_TIMER_ID, 500, NULL); + SetTimer(pSysTray->GetHWnd(), HOTPLUG_TIMER_ID, GetDoubleClickTime(), NULL); break; case WM_LBUTTONUP: diff --git a/dll/shellext/stobject/power.cpp b/dll/shellext/stobject/power.cpp index ada4fb1e812..24d5fd888ba 100644 --- a/dll/shellext/stobject/power.cpp +++ b/dll/shellext/stobject/power.cpp @@ -388,7 +388,7 @@ HRESULT STDMETHODCALLTYPE Power_Message(_In_ CSysTray * pSysTray, UINT uMsg, WPA switch (lParam) { case WM_LBUTTONDOWN: - SetTimer(pSysTray->GetHWnd(), POWER_TIMER_ID, 500, NULL); + SetTimer(pSysTray->GetHWnd(), POWER_TIMER_ID, GetDoubleClickTime(), NULL); break; case WM_LBUTTONUP: diff --git a/dll/shellext/stobject/volume.cpp b/dll/shellext/stobject/volume.cpp index ba0f9053563..931cd2e2ae3 100644 --- a/dll/shellext/stobject/volume.cpp +++ b/dll/shellext/stobject/volume.cpp @@ -300,7 +300,7 @@ HRESULT STDMETHODCALLTYPE Volume_Message(_In_ CSysTray * pSysTray, UINT uMsg, WP switch (lParam) { case WM_LBUTTONDOWN: - SetTimer(pSysTray->GetHWnd(), VOLUME_TIMER_ID, 500, NULL); + SetTimer(pSysTray->GetHWnd(), VOLUME_TIMER_ID, GetDoubleClickTime(), NULL); break; case WM_LBUTTONUP: