[vlc-commits] vout:win32: remove SetThumbnailClip
Pierre Lamot
git at videolan.org
Thu Aug 20 10:21:09 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Jul 28 14:13:13 2020 +0200| [ad3c0ba11acf5db25c9dfa5dbce81c51f6b25204] | committer: Pierre Lamot
vout:win32: remove SetThumbnailClip
this is the responsibility of the application to define how the taskbar should
be configured.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad3c0ba11acf5db25c9dfa5dbce81c51f6b25204
---
modules/video_output/win32/common.c | 59 -------------------------------------
1 file changed, 59 deletions(-)
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 893124a649..a09e40b569 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -37,9 +37,6 @@
#include <windows.h>
#include <assert.h>
-#define COBJMACROS
-#include <shobjidl.h>
-
#include "events.h"
#include "common.h"
#include "../../video_chroma/copy.h"
@@ -53,8 +50,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 +125,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 +133,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)
More information about the vlc-commits
mailing list