mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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([=] {
|
) | rpl::start_with_next([=] {
|
||||||
fieldChanged();
|
fieldChanged();
|
||||||
}, _field->lifetime());
|
}, _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(
|
connect(
|
||||||
controller->widget()->windowHandle(),
|
controller->widget()->windowHandle(),
|
||||||
&QWindow::visibleChanged,
|
&QWindow::visibleChanged,
|
||||||
|
|
|
@ -1558,6 +1558,14 @@ void ComposeControls::initField() {
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
fieldChanged();
|
fieldChanged();
|
||||||
}, _field->lifetime());
|
}, _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) {
|
InitMessageField(_show, _field, [=](not_null<DocumentData*> emoji) {
|
||||||
if (_history && Data::AllowEmojiWithoutPremium(_history->peer)) {
|
if (_history && Data::AllowEmojiWithoutPremium(_history->peer)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue