Skip to content

Commit

Permalink
YalWindows: ignore windows without titles
Browse files Browse the repository at this point in the history
It seems that there are processes with a valid MainWindowHandle that don't respond to SetForegroundWindow
  • Loading branch information
flvdnc committed Oct 21, 2016
1 parent 212699e commit 6caa9ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YalWindows/YalWindows.cs
Expand Up @@ -52,7 +52,7 @@ public void SaveSettings()

public List<PluginItem> GetItems(string userInput)
{
return Process.GetProcesses().Where(process => process.MainWindowHandle != IntPtr.Zero && process.ProcessName != "explorer").Select(process => new PluginItem()
return Process.GetProcesses().Where(process => process.MainWindowHandle != IntPtr.Zero && process.MainWindowTitle != "").Select(process => new PluginItem()
{
Item = process.MainWindowTitle, Info = string.Join(" ", Activator, process.MainWindowTitle),
IconLocation = Properties.Settings.Default.GetAppIcons ? Utils.GetProcessFileLocation(process) : null,
Expand Down

0 comments on commit 6caa9ca

Please sign in to comment.