Compare commits

..

No commits in common. "6d89a6bc15238d58bd7004c0f0fc1bee53feb6ff" and "2ba051b59b1cb01c9d9467624a0dd08dfd5c7367" have entirely different histories.

2 changed files with 4 additions and 17 deletions

View File

@ -128,15 +128,6 @@ int Entry::lastCaretPos() const
return int(m_boxes.size() - 1);
}
gfx::Point Entry::caretPosOnScreen() const
{
const gfx::Point caretPos = getCharBoxBounds(m_caret).point2();
const os::Window* nativeWindow = display()->nativeWindow();
const gfx::Point pos = nativeWindow->pointToScreen(caretPos + bounds().origin());
return pos;
}
void Entry::setCaretPos(const int pos)
{
gfx::Size caretSize = theme()->getEntryCaretSize(this);
@ -169,8 +160,6 @@ void Entry::setCaretPos(const int pos)
startTimer();
m_state = true;
os::System::instance()->setTextInput(true, caretPosOnScreen());
invalidate();
}
@ -262,7 +251,7 @@ gfx::Rect Entry::getEntryTextBounds() const
return onGetEntryTextBounds();
}
gfx::Rect Entry::getCharBoxBounds(const int i) const
gfx::Rect Entry::getCharBoxBounds(const int i)
{
ASSERT(i >= 0 && i < int(m_boxes.size()));
if (i >= 0 && i < int(m_boxes.size()))
@ -299,9 +288,8 @@ bool Entry::onProcessMessage(Message* msg)
}
// Start processing dead keys
if (m_translate_dead_keys) {
os::System::instance()->setTextInput(true, caretPosOnScreen());
}
if (m_translate_dead_keys)
os::System::instance()->setTextInput(true);
break;
case kFocusLeaveMessage:

View File

@ -43,7 +43,6 @@ public:
int caretPos() const { return m_caret; }
int lastCaretPos() const;
gfx::Point caretPosOnScreen() const;
void setCaretPos(int pos);
void setCaretToEnd();
@ -77,7 +76,7 @@ public:
obs::signal<void()> Change;
protected:
gfx::Rect getCharBoxBounds(int i) const;
gfx::Rect getCharBoxBounds(int i);
// Events
bool onProcessMessage(Message* msg) override;