Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Flow.Launcher.Core/Resource/Internationalization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static void InitSystemLanguageCode()
string.Equals(languageCode, fullName, StringComparison.OrdinalIgnoreCase))
{
SystemLanguageCode = languageCode;
return;
}
}

Expand Down
19 changes: 14 additions & 5 deletions Flow.Launcher.Infrastructure/Win32Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,18 +292,27 @@ public static unsafe bool IsForegroundWindowFullscreen()
return appBounds.top < 0 && appBounds.bottom < 0;
}

// For desktop (Progman or WorkerW, depends on the system), we have to check
// For desktop (Progman or WorkerW, depends on the system),
// we have to check for this hierarchy:
// Progman/WorkerW -> SHELLDLL_DefView -> SysListView32("FolderView")
if (windowClass is WINDOW_CLASS_PROGMAN or WINDOW_CLASS_WORKERW)
{
var hWndDesktop = PInvoke.FindWindowEx(hWnd, HWND.Null, "SHELLDLL_DefView", null);
hWndDesktop = PInvoke.FindWindowEx(hWndDesktop, HWND.Null, "SysListView32", "FolderView");
if (hWndDesktop != HWND.Null)
var hWndDefView = PInvoke.FindWindowEx(hWnd, HWND.Null, "SHELLDLL_DefView", null);
if (hWndDefView != HWND.Null)
{
return false;
var hWndFolderView = PInvoke.FindWindowEx(hWndDefView, HWND.Null, "SysListView32", "FolderView");
if (hWndFolderView != HWND.Null)
{
return false;
}
}
}

var monitorInfo = MonitorInfo.GetNearestDisplayMonitor(hWnd);
if (monitorInfo == null)
{
return false;
}
return (appBounds.bottom - appBounds.top) == monitorInfo.Bounds.Height &&
(appBounds.right - appBounds.left) == monitorInfo.Bounds.Width;
}
Expand Down
Loading