Implement separate instances for web apps.

This commit is contained in:
John Preston
2024-07-19 14:06:30 +02:00
parent 9461095c88
commit fd982b90db
14 changed files with 1202 additions and 1084 deletions

View File

@@ -1282,6 +1282,27 @@ void Panel::showBox(
}
}
}
const auto raw = box.data();
InvokeQueued(raw, [=] {
if (raw->window()->isActiveWindow()) {
// In case focus is somewhat in a native child window,
// like a webview, Qt glitches here with input fields showing
// focused state, but not receiving any keyboard input:
//
// window()->windowHandle()->isActive() == false.
//
// Steps were: SeparatePanel with a WebView2 child,
// some interaction with mouse inside the WebView2,
// so that WebView2 gets focus and active window state,
// then we call setSearchAllowed() and after animation
// is finished try typing -> nothing happens.
//
// With this workaround it works fine.
_widget->activateWindow();
}
});
_widget->showBox(
std::move(box),
LayerOption::KeepOther,