public static bool IsMainSpotifyWindow(IntPtr windowHandle) { var windowTitle = NativeUtils.GetWindowTitle(windowHandle); if (string.IsNullOrWhiteSpace(windowTitle)) { return(false); } if (windowTitle == "G" || windowTitle == "Default IME") { return(false); } var windowClassName = NativeUtils.GetWindowClassName(windowHandle); return(windowClassName.Equals("Chrome_WidgetWin_0", StringComparison.Ordinal)); }