2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Fix accidental search focusing.

This commit is contained in:
John Preston
2024-04-26 11:10:12 +04:00
parent c6d034174b
commit 10c427127e
4 changed files with 18 additions and 11 deletions

View File

@@ -165,16 +165,7 @@ Cover::Cover(
}, _name->lifetime());
}
Cover::~Cover() {
if (_emojiStatusPanel.hasFocus()) {
// Panel will try to return focus to the layer widget, the problem is
// we are destroying the layer widget probably right now and focusing
// it will lead to a crash, because it destroys its children (how we
// got here) after it clears focus out of itself. So if you return
// the focus inside a child destructor, it won't be cleared at all.
window()->setFocus();
}
}
Cover::~Cover() = default;
void Cover::setupChildGeometry() {
using namespace rpl::mappers;