Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libobs: Also determine WinUI 3 Window #10920

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions libobs/util/windows/window-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ bool ms_is_uwp_window(HWND hwnd)
if (!GetClassNameW(hwnd, name, sizeof(name) / sizeof(wchar_t)))
return false;

return wcscmp(name, L"ApplicationFrameWindow") == 0;
return wcscmp(name, L"ApplicationFrameWindow") == 0 ||
wcscmp(name, L"WinUIDesktopWin32WindowClass") == 0;
}

HWND ms_get_uwp_actual_window(HWND parent)
Expand Down Expand Up @@ -499,7 +500,8 @@ static bool is_generic_class(const char *current_class)

static bool is_uwp_class(const char *window_class)
{
return strcmp(window_class, "Windows.UI.Core.CoreWindow") == 0;
return strcmp(window_class, "Windows.UI.Core.CoreWindow") == 0 ||
strcmp(window_class, "WinUIDesktopWin32WindowClass") == 0;
}

HWND ms_find_window(enum window_search_mode mode, enum window_priority priority,
Expand Down
14 changes: 14 additions & 0 deletions plugins/win-capture/data/compatibility.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,20 @@
"message": "UWP applications may not be capturable using the selected Capture Method (BitBlt).",
"url": ""
},
{
"name": "WinUI 3",
"translation_key": "Compatibility.WindowCapture.BitBlt.Applications",
"severity": 0,
"executable": "",
"window_class": "WinUIDesktopWin32WindowClass",
"window_title": "",
"match_flags": 4,
"game_capture": false,
"window_capture": true,
"window_capture_wgc": false,
"message": "WinUI 3 applications may not be capturable using the selected Capture Method (BitBlt).",
"url": ""
},
{
"name": "Gaming Services",
"translation_key": "Compatibility.WindowCapture.BitBlt.Applications",
Expand Down
1 change: 1 addition & 0 deletions plugins/win-capture/window-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ static const char *wgc_partial_match_classes[] = {
static const char *wgc_whole_match_classes[] = {
"ApplicationFrameWindow",
"Windows.UI.Core.CoreWindow",
"WinUIDesktopWin32WindowClass",
"GAMINGSERVICESUI_HOSTING_WINDOW_CLASS",
"XLMAIN", /* Microsoft Excel */
"PPTFrameClass", /* Microsoft PowerPoint */
Expand Down
Loading