1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00

Change unhook only be called if we hook in the first place

This commit is contained in:
Elias Steurer 2021-05-13 13:59:35 +02:00
parent ea8852dafc
commit f01e713d11

View File

@ -547,7 +547,10 @@ void WinWindow::checkForFullScreenWindow()
*/
void WinWindow::terminate()
{
UnhookWindowsHookEx(g_mouseHook);
using ScreenPlay::InstalledType::InstalledType;
if (type() != InstalledType::VideoWallpaper && type() != InstalledType::GifWallpaper) {
UnhookWindowsHookEx(g_mouseHook);
}
ShowWindow(m_windowHandle, SW_HIDE);
// Force refresh so that we display the regular