mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Windows: Fix bug where IME displayed at incorrect location on scaled displays
This commit is contained in:
parent
038b0d6c9e
commit
cfee7cfc93
1 changed files with 3 additions and 2 deletions
|
|
@ -4586,9 +4586,10 @@ private:
|
|||
{
|
||||
if (auto* targetComp = dynamic_cast<Component*> (target))
|
||||
{
|
||||
auto area = peer.getComponent().getLocalArea (targetComp, target->getCaretRectangle());
|
||||
const auto screenPos = targetComp->localPointToGlobal (target->getCaretRectangle().getBottomLeft());
|
||||
const auto relativePos = peer.globalToLocal (screenPos) * peer.getPlatformScaleFactor();
|
||||
|
||||
CANDIDATEFORM pos = { 0, CFS_CANDIDATEPOS, { area.getX(), area.getBottom() }, { 0, 0, 0, 0 } };
|
||||
CANDIDATEFORM pos { 0, CFS_CANDIDATEPOS, D2DUtilities::toPOINT (relativePos), { 0, 0, 0, 0 } };
|
||||
ImmSetCandidateWindow (hImc, &pos);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue