File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/ManagedShell.WindowsTasks Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -360,9 +360,10 @@ public bool CanAddToTaskbar
360360 bool isToolWindow = ( extendedWindowStyles & ( int ) NativeMethods . ExtendedWindowStyles . WS_EX_TOOLWINDOW ) != 0 ;
361361 bool isAppWindow = ( extendedWindowStyles & ( int ) NativeMethods . ExtendedWindowStyles . WS_EX_APPWINDOW ) != 0 ;
362362 bool isNoActivate = ( extendedWindowStyles & ( int ) NativeMethods . ExtendedWindowStyles . WS_EX_NOACTIVATE ) != 0 ;
363+ bool isDeleted = NativeMethods . GetProp ( Handle , "ITaskList_Deleted" ) != IntPtr . Zero ;
363364 IntPtr ownerWin = NativeMethods . GetWindow ( Handle , NativeMethods . GetWindow_Cmd . GW_OWNER ) ;
364365
365- return isWindow && isVisible && ( ownerWin == IntPtr . Zero || isAppWindow ) && ( ! isNoActivate || isAppWindow ) && ! isToolWindow ;
366+ return isWindow && isVisible && ( ownerWin == IntPtr . Zero || isAppWindow ) && ( ! isNoActivate || isAppWindow ) && ! isToolWindow && ! isDeleted ;
366367 }
367368 }
368369
You can’t perform that action at this time.
0 commit comments