//WINSHELLAPI BOOL WINAPI SHFullScreen(HWND hwndRequester, DWORD dwState);
#endif
+static void CommonChangeThumbnailClip(vout_display_t *, bool show);
static int CommonControlSetFullscreen(vout_display_t *, bool is_fullscreen);
static void DisableScreensaver(vout_display_t *);
vout_display_sys_t *sys = vd->sys;
if (sys->event) {
+ CommonChangeThumbnailClip(vd, false);
EventThreadStop(sys->event);
EventThreadDestroy(sys->event);
}
r->right = ((r->right - r->left + align_size/2) & ~align_size) + r->left;
}
+/* */
+static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
+{
+#ifndef UNDER_CE
+ vout_display_sys_t *sys = vd->sys;
+
+ /* Windows 7 taskbar thumbnail code */
+ OSVERSIONINFO winVer;
+ winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ if (!GetVersionEx(&winVer) || winVer.dwMajorVersion <= 5)
+ return;
+
+ CoInitialize(0);
+
+ LPTASKBARLIST3 taskbl;
+ if (S_OK == CoCreateInstance(&clsid_ITaskbarList,
+ NULL, CLSCTX_INPROC_SERVER,
+ &IID_ITaskbarList3,
+ &taskbl)) {
+ taskbl->vt->HrInit(taskbl);
+
+ HWND hroot = GetAncestor(sys->hwnd,GA_ROOT);
+ RECT relative;
+ if (show) {
+ RECT video, parent;
+ GetWindowRect(sys->hvideownd, &video);
+ GetWindowRect(hroot, &parent);
+ relative.left = video.left - parent.left - 8;
+ relative.top = video.top - parent.top - 10;
+
+ relative.right = video.right - video.left + relative.left;
+ relative.bottom = video.bottom - video.top + relative.top - 25;
+ }
+ if (S_OK != taskbl->vt->SetThumbnailClip(taskbl, hroot,
+ show ? &relative : NULL))
+ msg_Err(vd, "SetThumbNailClip failed");
+
+ taskbl->vt->Release(taskbl);
+ }
+ CoUninitialize();
+#endif
+}
+
/*****************************************************************************
* UpdateRects: update clipping rectangles
*****************************************************************************
rect_dest_clipped.bottom -= sys->rect_display.top;
#endif
-#ifndef UNDER_CE
- /* Windows 7 taskbar thumbnail code */
- LPTASKBARLIST3 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,
- &taskbl)) {
- RECT rect_video, rect_parent, rect_relative;
- HWND hroot = GetAncestor(sys->hwnd,GA_ROOT);
-
- taskbl->vt->HrInit(taskbl);
- GetWindowRect(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 != taskbl->vt->SetThumbnailClip(taskbl, hroot, &rect_relative))
- msg_Err(vd, "SetThumbNailClip failed");
-
- taskbl->vt->Release(taskbl);
- }
- CoUninitialize();
- }
-#endif
+ CommonChangeThumbnailClip(vd, true);
+
/* Signal the change in size/position */
sys->changes |= DX_POSITION_CHANGE;