xcbWindow: Callback w/early ret if window not found

This commit is contained in:
2025-09-29 12:19:03 -04:00
parent 542e3081ad
commit f1ce1ab19c
+9 -2
View File
@@ -283,8 +283,15 @@ static void xcbWindow_attachDeviceReq(
// Not used yet, but may be used later. // Not used yet, but may be used later.
(void)componentThread; (void)componentThread;
g_attachedWindows.emplace_back( try {
std::make_unique<xcb_window::AttachedWindow>(desc)); g_attachedWindows.emplace_back(
std::make_unique<xcb_window::AttachedWindow>(desc));
} catch (const std::exception& exc) {
std::cerr << __func__ << ": Exception while attaching X11 window: "
<< exc.what() << "\n";
cb.callbackFn(false, desc);
return;
}
std::cout << __func__ << ": Attached X11 window:\n " std::cout << __func__ << ": Attached X11 window:\n "
<< g_attachedWindows.back()->stringify() << g_attachedWindows.back()->stringify()