Index: base/shell/explorer-new/precomp.h =================================================================== --- base/shell/explorer-new/precomp.h (revision 58101) +++ base/shell/explorer-new/precomp.h (working copy) @@ -374,6 +374,29 @@ #define TCWM_GETMINIMUMSIZE (WM_USER + 0x100) #define TCWM_UPDATETIME (WM_USER + 0x101) +typedef struct _TRAY_NOTIFY_WND_DATA +{ + HWND hWnd; + HWND hWndTrayClock; + HWND hWndNotify; + HWND hWndSysPager; + HTHEME TrayTheme; + SIZE szTrayClockMin; + SIZE szTrayNotify; + MARGINS ContentMargin; + ITrayWindow *TrayWindow; + HFONT hFontClock; + union + { + DWORD dwFlags; + struct + { + DWORD HideClock : 1; + DWORD IsHorizontal : 1; + }; + }; +} TRAY_NOTIFY_WND_DATA, *PTRAY_NOTIFY_WND_DATA; + /* TrayNotifyWnd */ #define TNWM_GETMINIMUMSIZE (WM_USER + 0x100) #define TNWM_UPDATETIME (WM_USER + 0x101) Index: base/shell/explorer-new/trayntfy.c =================================================================== --- base/shell/explorer-new/trayntfy.c (revision 58101) +++ base/shell/explorer-new/trayntfy.c (working copy) @@ -1451,29 +1451,6 @@ #define TRAY_NOTIFY_WND_SPACING_X 2 #define TRAY_NOTIFY_WND_SPACING_Y 2 -typedef struct _TRAY_NOTIFY_WND_DATA -{ - HWND hWnd; - HWND hWndTrayClock; - HWND hWndNotify; - HWND hWndSysPager; - HTHEME TrayTheme; - SIZE szTrayClockMin; - SIZE szTrayNotify; - MARGINS ContentMargin; - ITrayWindow *TrayWindow; - HFONT hFontClock; - union - { - DWORD dwFlags; - struct - { - DWORD HideClock : 1; - DWORD IsHorizontal : 1; - }; - }; -} TRAY_NOTIFY_WND_DATA, *PTRAY_NOTIFY_WND_DATA; - static VOID TrayNotifyWnd_UpdateTheme(IN OUT PTRAY_NOTIFY_WND_DATA This) { Index: base/shell/explorer-new/traywnd.c =================================================================== --- base/shell/explorer-new/traywnd.c (revision 58101) +++ base/shell/explorer-new/traywnd.c (working copy) @@ -2437,9 +2437,26 @@ } case WM_NCLBUTTONDBLCLK: - /* We "handle" this message so users can't cause a weird maximize/restore + { + /* We "handle" WM_NCLBUTTONDBLCLK message so users can't cause a weird maximize/restore window animation when double-clicking the tray window! */ + + /* Check if the user clicked on the clock window */ + PTRAY_NOTIFY_WND_DATA pTrayImpl = (PTRAY_NOTIFY_WND_DATA)GetWindowLongPtr(This->hwndTrayNotify, 0); + if (IsWindowVisible(pTrayImpl->hWndTrayClock)) + { + RECT tClockRect; + POINT tPtClick; + GetWindowRect(pTrayImpl->hWndTrayClock, &tClockRect); + tPtClick.x = MAKEPOINTS(lParam).x; + tPtClick.y = MAKEPOINTS(lParam).y; + if (PtInRect(&tClockRect,tPtClick)) + { + LaunchCPanel(NULL, TEXT("timedate.cpl")); + } + } break; + } case WM_NCCREATE: {