Skip refocus InputField::Inner if field unfocused.

I hope this fixes #26223.
This commit is contained in:
John Preston
2023-05-24 21:20:18 +04:00
parent f671897a4d
commit 2fb7bdc803
13 changed files with 152 additions and 130 deletions
+2 -16
View File
@@ -407,7 +407,7 @@ MainWidget *MainWindow::sessionContent() const {
return _main.data();
}
void MainWindow::showBoxOrLayer(
void MainWindow::showOrHideBoxOrLayer(
std::variant<
v::null_t,
object_ptr<Ui::BoxContent>,
@@ -419,7 +419,7 @@ void MainWindow::showBoxOrLayer(
if (auto layerWidget = std::get_if<UniqueLayer>(&layer)) {
ensureLayerCreated();
_layer->showLayer(std::move(*layerWidget), options, animated);
} else if (auto box = std::get_if<ObjectBox>(&layer); *box != nullptr) {
} else if (auto box = std::get_if<ObjectBox>(&layer)) {
ensureLayerCreated();
_layer->showBox(std::move(*box), options, animated);
} else {
@@ -435,20 +435,6 @@ void MainWindow::showBoxOrLayer(
}
}
void MainWindow::ui_showBox(
object_ptr<Ui::BoxContent> box,
Ui::LayerOptions options,
anim::type animated) {
showBoxOrLayer(std::move(box), options, animated);
}
void MainWindow::showLayer(
std::unique_ptr<Ui::LayerWidget> &&layer,
Ui::LayerOptions options,
anim::type animated) {
showBoxOrLayer(std::move(layer), options, animated);
}
bool MainWindow::ui_isLayerShown() const {
return _layer != nullptr;
}