mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
UniversalEntry: fix input method issue on macOS
This commit is contained in:
parent
c302cd3bfc
commit
b63e5def85
@ -3093,9 +3093,18 @@ void VMainWindow::initUniversalEntry()
|
||||
{
|
||||
m_ue = new VUniversalEntry(this);
|
||||
m_ue->hide();
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_MAC)
|
||||
// Qt::Popup on macOS does not work well with input method.
|
||||
m_ue->setWindowFlags(Qt::Tool
|
||||
| Qt::NoDropShadowWindowHint);
|
||||
m_ue->setWindowModality(Qt::ApplicationModal);
|
||||
#else
|
||||
m_ue->setWindowFlags(Qt::Popup
|
||||
| Qt::FramelessWindowHint
|
||||
| Qt::NoDropShadowWindowHint);
|
||||
#endif
|
||||
|
||||
connect(m_ue, &VUniversalEntry::exited,
|
||||
this, [this]() {
|
||||
m_captain->setCaptainModeEnabled(true);
|
||||
|
@ -274,6 +274,10 @@ void VUniversalEntry::keyPressEvent(QKeyEvent *p_event)
|
||||
|
||||
break;
|
||||
|
||||
case Qt::Key_Escape:
|
||||
hide();
|
||||
return;
|
||||
|
||||
// Up/Down Ctrl+K/J to navigate to next item.
|
||||
case Qt::Key_Up:
|
||||
forward = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user