[explorer_new]

- Implement showing and closing the start menu by pressing the WIN key
- Implement handling WM_KLUDGEMINRECT message that informs the window manager the place of an application in the taskbar in order to show the minimization or maximization animation of a window
- Implement showing taskbar settings when the user selects to show the taskbar settings from the settings menu in start menu
- Implement hiding the Favorites menu in the start menu when needed

svn path=/branches/shell-experiments/; revision=62010
This commit is contained in:
Giannis Adamopoulos 2014-02-06 13:01:54 +00:00
parent c82da59af8
commit 1724ea64fb
4 changed files with 47 additions and 3 deletions

View file

@ -23,6 +23,7 @@
#include <shlguid_undoc.h>
#include <uxtheme.h>
#include <strsafe.h>
#include <undocuser.h>
#include "tmschema.h"
#include "resource.h"

View file

@ -552,7 +552,15 @@ IStartMenuSiteImpl_AppendMenu(IN OUT ITrayPriv *iface,
TEXT("Advanced"),
TEXT("StartMenuLogoff")));
/* FIXME: Favorites */
/* Favorites */
if (!GetExplorerRegValueSet(HKEY_CURRENT_USER,
TEXT("Advanced"),
TEXT("StartMenuFavorites")))
{
DeleteMenu(hMenu,
IDM_FAVORITES,
MF_BYCOMMAND);
}
/* Documents */
if (SHRestricted(REST_NORECENTDOCSMENU))

View file

@ -1632,6 +1632,9 @@ TaskSwitchWnd_HandleShellHookMsg(IN OUT PTASK_SWITCH_WND This,
break;
case HSHELL_TASKMAN:
PostMessage(ITrayWindow_GetHWND(This->Tray), TWM_OPENSTARTMENU,0, 0);
break;
case HSHELL_LANGUAGE:
case HSHELL_SYSMENU:
case HSHELL_ENDTASK:
@ -2123,6 +2126,24 @@ ForwardContextMenuMsg:
break;
#endif
case WM_KLUDGEMINRECT:
{
PTASK_ITEM TaskItem = TaskSwitchWnd_FindTaskItem(This, (HWND)wParam);
if (TaskItem)
{
RECT* prcMinRect = (RECT*)lParam;
RECT rcItem, rcToolbar;
SendMessageW(This->hWndToolbar,TB_GETITEMRECT, TaskItem->Index, (LPARAM)&rcItem);
GetWindowRect(This->hWndToolbar, &rcToolbar);
OffsetRect(&rcItem, rcToolbar.left, rcToolbar.top);
*prcMinRect = rcItem;
return TRUE;
}
return FALSE;
}
default:
/* HandleDefaultMessage: */
if (uMsg == This->ShellHookMsg && This->ShellHookMsg != 0)

View file

@ -2550,9 +2550,19 @@ HandleTrayContextMenu:
break;
case TWM_OPENSTARTMENU:
SendMessage(This->hWnd, WM_COMMAND, MAKEWPARAM(BN_CLICKED, IDC_STARTBTN), (LPARAM)This->hwndStart);
break;
{
HWND hwndStartMenu;
HRESULT hr = IUnknown_GetWindow((IUnknown*)This->StartMenuPopup, &hwndStartMenu);
if (FAILED(hr))
break;
if (IsWindowVisible(hwndStartMenu))
SetWindowPos(hwndStartMenu, 0,0,0,0,0, SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER);
else
SendMessage(This->hWnd, WM_COMMAND, MAKEWPARAM(BN_CLICKED, IDC_STARTBTN), (LPARAM)This->hwndStart);
break;
}
case WM_COMMAND:
if ((HWND)lParam == This->hwndStart)
{
@ -2603,6 +2613,10 @@ HandleTrayContextMenu:
{
/* FIXME: Handle these commands as well */
case IDM_TASKBARANDSTARTMENU:
ITrayWindowImpl_DisplayProperties(ITrayWindow_from_impl(This));
break;
case IDM_SEARCH:
case IDM_HELPANDSUPPORT:
break;