Fix Windows not deblurring when name changes
This commit is contained in:
parent
6d09501a7f
commit
3b52c1a5ee
@ -52,19 +52,23 @@ public class Blur
|
||||
WindowInfo windowInfo = windowInfos.FirstOrDefault(w => w.WindowHandle == window);
|
||||
if(windowInfo is {WindowHandle: 0x0})//No WindowInfo found
|
||||
continue;
|
||||
|
||||
if(ShouldWindowBeBlurred(windowInfo))
|
||||
|
||||
if (ShouldWindowBeBlurred(windowInfo))
|
||||
{
|
||||
if(!maximisedWindowReached)
|
||||
BlurWindow(windowInfo);
|
||||
else if(maximisedWindowReached)
|
||||
DeleteBlur(windowInfo);
|
||||
}
|
||||
else
|
||||
DeleteBlur(windowInfo);
|
||||
|
||||
if (windowInfo.WindowCommands is ShowWindowCommands.Maximize or ShowWindowCommands.ShowMaximized)
|
||||
maximisedWindowReached = true;
|
||||
}
|
||||
|
||||
foreach(IntPtr blurredWindow in _windowHandleSceneItems.Keys.ToArray())
|
||||
if(windowInfos.All(w => w.WindowHandle != blurredWindow))
|
||||
if(windowInfos.All(w => w.WindowHandle != blurredWindow) || !ShouldWindowBeBlurred(windowInfos.First(w => w.WindowHandle == blurredWindow)))
|
||||
DeleteBlur(blurredWindow);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user