mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:55:42 +00:00
[STOBJECT] Use timers to distinguish between single and double clicks
- Volume, Power and Hotplug icon: Use timers to distinguish between single and double clicks. - Volume icon: Show the tray volume dialog on a single click.
This commit is contained in:
parent
b95fff5bce
commit
2baafa61c6
4 changed files with 39 additions and 9 deletions
|
@ -374,19 +374,28 @@ HRESULT STDMETHODCALLTYPE Power_Message(_In_ CSysTray * pSysTray, UINT uMsg, WPA
|
|||
}
|
||||
return S_FALSE;
|
||||
|
||||
case WM_TIMER:
|
||||
if (wParam == POWER_TIMER_ID)
|
||||
{
|
||||
KillTimer(pSysTray->GetHWnd(), POWER_TIMER_ID);
|
||||
ShowPowerSchemesPopupMenu(pSysTray);
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_ICON_POWER:
|
||||
Power_Update(pSysTray);
|
||||
|
||||
switch (lParam)
|
||||
{
|
||||
case WM_LBUTTONDOWN:
|
||||
SetTimer(pSysTray->GetHWnd(), POWER_TIMER_ID, 500, NULL);
|
||||
break;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
ShowPowerSchemesPopupMenu(pSysTray);
|
||||
break;
|
||||
|
||||
case WM_LBUTTONDBLCLK:
|
||||
KillTimer(pSysTray->GetHWnd(), POWER_TIMER_ID);
|
||||
_RunPower();
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue