Skip to content

Commit

Permalink
#21 WindowFinder overhaul: Hopefully corrected the supposed Alt-Tab i…
Browse files Browse the repository at this point in the history
…mplementation.
  • Loading branch information
FrigoCoder committed Jan 5, 2018
1 parent 72798fa commit 8702493
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions FrigoTab/WindowFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ private static WindowType GetWindowType (WindowHandle handle) {
if( Dwm.IsCloaked(handle) ) {
return WindowType.Hidden;
}
if( !IsAltTabWindow(handle) ) {
return WindowType.Hidden;
}

WindowStyles style = handle.GetWindowStyles();
if( style.HasFlag(WindowStyles.Disabled) ) {
Expand All @@ -69,7 +66,7 @@ private static WindowType GetWindowType (WindowHandle handle) {
return WindowType.ToolWindow;
}

return WindowType.AppWindow;
return IsAltTabWindow(handle) ? WindowType.AppWindow : WindowType.Hidden;
}

private static bool IsAltTabWindow (IntPtr hwnd) {
Expand All @@ -82,7 +79,7 @@ private static bool IsAltTabWindow (IntPtr hwnd) {
break;
}
}
return hwndWalk == hwnd;
return hwndTry == hwnd;
}

[DllImport("user32.dll")]
Expand Down

0 comments on commit 8702493

Please sign in to comment.