mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Fixed text insertion from menu bar on macOS when input field is hidden.
This commit is contained in:
parent
0372f2be9c
commit
92f0358800
2 changed files with 16 additions and 0 deletions
|
@ -337,6 +337,14 @@ HistoryWidget::HistoryWidget(
|
|||
) | rpl::start_with_next([=] {
|
||||
fieldChanged();
|
||||
}, _field->lifetime());
|
||||
#ifdef Q_OS_MAC
|
||||
// Removed an ability to insert text from the menu bar
|
||||
// when the field is hidden.
|
||||
_field->shownValue(
|
||||
) | rpl::start_with_next([=](bool shown) {
|
||||
_field->setEnabled(shown);
|
||||
}, _field->lifetime());
|
||||
#endif // Q_OS_MAC
|
||||
connect(
|
||||
controller->widget()->windowHandle(),
|
||||
&QWindow::visibleChanged,
|
||||
|
|
|
@ -1558,6 +1558,14 @@ void ComposeControls::initField() {
|
|||
) | rpl::start_with_next([=] {
|
||||
fieldChanged();
|
||||
}, _field->lifetime());
|
||||
#ifdef Q_OS_MAC
|
||||
// Removed an ability to insert text from the menu bar
|
||||
// when the field is hidden.
|
||||
_field->shownValue(
|
||||
) | rpl::start_with_next([=](bool shown) {
|
||||
_field->setEnabled(shown);
|
||||
}, _field->lifetime());
|
||||
#endif // Q_OS_MAC
|
||||
InitMessageField(_show, _field, [=](not_null<DocumentData*> emoji) {
|
||||
if (_history && Data::AllowEmojiWithoutPremium(_history->peer)) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue