X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_output%2Fmsw%2Fevents.c;h=cb7356cd4fe0c2c56d50a1cadc5c8ac355f4d189;hb=1d100357067c95fa11563b9aea1ce2c8f36fcd4e;hp=7e263c797a09c42d0382be6f62b6adc76b33cb27;hpb=7fc317d6b5fc37d0e5a0f94160bf8a503975a29a;p=vlc diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c index 7e263c797a..cb7356cd4f 100644 --- a/modules/video_output/msw/events.c +++ b/modules/video_output/msw/events.c @@ -61,6 +61,10 @@ #include #include "vout.h" +#ifndef UNDER_CE +#include +#endif + #ifdef UNDER_CE #include //WINSHELLAPI BOOL WINAPI SHFullScreen(HWND hwndRequester, DWORD dwState); @@ -793,6 +797,39 @@ void UpdateRects( vout_thread_t *p_vout, bool b_force ) DirectDrawUpdateOverlay( p_vout ); #endif +#ifndef UNDER_CE + /* Windows 7 taskbar thumbnail code */ + LPTASKBARLIST3 p_taskbl; + OSVERSIONINFO winVer; + winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + if( GetVersionEx(&winVer) && winVer.dwMajorVersion > 5 ) + { + CoInitialize( 0 ); + + if( S_OK == CoCreateInstance( &clsid_ITaskbarList, + NULL, CLSCTX_INPROC_SERVER, + &IID_ITaskbarList3, + &p_taskbl) ) + { + RECT rect_video, rect_parent, rect_relative; + HWND hroot = GetAncestor(p_vout->p_sys->hwnd,GA_ROOT); + + p_taskbl->vt->HrInit(p_taskbl); + GetWindowRect(p_vout->p_sys->hvideownd, &rect_video); + GetWindowRect(hroot, &rect_parent); + rect_relative.left = rect_video.left - rect_parent.left - 8; + rect_relative.right = rect_video.right - rect_video.left + rect_relative.left; + rect_relative.top = rect_video.top - rect_parent.top - 10; + rect_relative.bottom = rect_video.bottom - rect_video.top + rect_relative.top - 25; + + if (S_OK != p_taskbl->vt->SetThumbnailClip(p_taskbl, hroot, &rect_relative)) + msg_Err( p_vout, "SetThumbNailClip failed"); + + p_taskbl->vt->Release(p_taskbl); + } + CoUninitialize(); + } +#endif /* Signal the change in size/position */ p_vout->p_sys->i_changes |= DX_POSITION_CHANGE;