[vlc-devel] [PATCH 15/16] vout:win32: remove SetThumbnailClip

Steve Lhomme robux4 at ycbcr.xyz
Thu Aug 6 16:29:45 CEST 2020


OK

You can also remove this

#define COBJMACROS
#include <shobjidl.h>


On 2020-08-06 9:44, Pierre Lamot wrote:
>    this is the responsibility of the application to define how the taskbar should
>    be configured.
> ---
>   modules/video_output/win32/common.c | 56 -----------------------------
>   1 file changed, 56 deletions(-)
> 
> diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
> index 893124a649..382d5eb9c2 100644
> --- a/modules/video_output/win32/common.c
> +++ b/modules/video_output/win32/common.c
> @@ -53,8 +53,6 @@ void CommonInit(vout_display_t *vd, display_win32_area_t *area, const vout_displ
>   }
>   
>   #if !VLC_WINSTORE_APP
> -static void CommonChangeThumbnailClip(vlc_object_t *, vout_display_sys_win32_t *, bool show);
> -
>   /* */
>   int CommonWindowInit(vout_display_t *vd, display_win32_area_t *area,
>                        vout_display_sys_win32_t *sys, bool projection_gestures)
> @@ -130,13 +128,6 @@ void CommonPlacePicture(vout_display_t *vd, display_win32_area_t *area, vout_dis
>           msg_Dbg(vd, "UpdateRects image_dst coords: %i,%i %ix%i",
>               area->place.x, area->place.y, area->place.width, area->place.height);
>   #endif
> -
> -#if !VLC_WINSTORE_APP
> -        if (sys->event != NULL)
> -        {
> -            CommonChangeThumbnailClip(VLC_OBJECT(vd), sys, true);
> -        }
> -#endif
>       }
>   }
>   
> @@ -145,57 +136,10 @@ void CommonPlacePicture(vout_display_t *vd, display_win32_area_t *area, vout_dis
>   void CommonWindowClean(vlc_object_t *obj, vout_display_sys_win32_t *sys)
>   {
>       if (sys->event) {
> -        CommonChangeThumbnailClip(obj, sys, false);
>           EventThreadStop(sys->event);
>           EventThreadDestroy(sys->event);
>       }
>   }
> -
> -/* */
> -static void CommonChangeThumbnailClip(vlc_object_t *obj, vout_display_sys_win32_t *sys, bool show)
> -{
> -    /* Windows 7 taskbar thumbnail code */
> -    OSVERSIONINFO winVer;
> -    winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
> -    if (!GetVersionEx(&winVer) || winVer.dwMajorVersion <= 5)
> -        return;
> -
> -    if( FAILED(CoInitializeEx(NULL, COINIT_MULTITHREADED)) )
> -        vlc_assert_unreachable();
> -
> -    void *ptr;
> -    if (S_OK == CoCreateInstance(&CLSID_TaskbarList,
> -                                 NULL, CLSCTX_INPROC_SERVER,
> -                                 &IID_ITaskbarList3,
> -                                 &ptr)) {
> -        ITaskbarList3 *taskbl = ptr;
> -        taskbl->lpVtbl->HrInit(taskbl);
> -
> -        HWND hroot = GetAncestor(sys->hvideownd, GA_ROOT);
> -        RECT video;
> -        if (show) {
> -            GetWindowRect(sys->hparent, &video);
> -            POINT client = {video.left, video.top};
> -            if (ScreenToClient(hroot, &client))
> -            {
> -                unsigned int width = RECTWidth(video);
> -                unsigned int height = RECTHeight(video);
> -                video.left = client.x;
> -                video.top = client.y;
> -                video.right = video.left + width;
> -                video.bottom = video.top + height;
> -            }
> -        }
> -        HRESULT hr;
> -        hr = taskbl->lpVtbl->SetThumbnailClip(taskbl, hroot,
> -                                                 show ? &video : NULL);
> -        if ( hr != S_OK )
> -            msg_Err(obj, "SetThumbNailClip failed: 0x%lX", hr);
> -
> -        taskbl->lpVtbl->Release(taskbl);
> -    }
> -    CoUninitialize();
> -}
>   #endif /* !VLC_WINSTORE_APP */
>   
>   int CommonControl(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_win32_t *sys, int query, va_list args)
> -- 
> 2.25.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list