mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
Fix freeze in IV due to cyclic focus request.
This commit is contained in:
parent
179e81478e
commit
c9bd776d1e
1 changed files with 5 additions and 3 deletions
|
@ -342,9 +342,11 @@ void Controller::createWindow() {
|
|||
_window = std::make_unique<Ui::RpWindow>();
|
||||
const auto window = _window.get();
|
||||
|
||||
window->windowActiveValue(
|
||||
) | rpl::filter([=](bool active) {
|
||||
return _webview && active;
|
||||
base::qt_signal_producer(
|
||||
window->window()->windowHandle(),
|
||||
&QWindow::activeChanged
|
||||
) | rpl::filter([=] {
|
||||
return _webview && window->window()->windowHandle()->isActive();
|
||||
}) | rpl::start_with_next([=] {
|
||||
setInnerFocus();
|
||||
}, window->lifetime());
|
||||
|
|
Loading…
Add table
Reference in a new issue