Page MenuHome

macOS: convert native OS window coordinate for Input Method
ClosedPublic

Authored by Yuki Hashimoto (hzuika) on Jun 24 2021, 10:42 PM.

Details

Summary

This patch is a continuation of D11695 but this patch is independent.

Blender need to tell the input method program where the conversion candidate window is during Japanese and Chinese input.
In macOS, there are displays where the window size and the native pixel size are different, so the candidate window may appear in an unnatural position.

This patch converts the cursor position x and y for matching macOS window coordinate.

On Windows, GHOST_GetNativePixelSize returns 1, so it has no effect.

Diff Detail

Repository
rB Blender

Event Timeline

Yuki Hashimoto (hzuika) requested review of this revision.Jun 24 2021, 10:42 PM
Yuki Hashimoto (hzuika) created this revision.
Yuki Hashimoto (hzuika) retitled this revision from macOS: use native pixel size to macOS: use native pixel size for IME candidate window.Jun 24 2021, 10:50 PM
Yuki Hashimoto (hzuika) edited the summary of this revision. (Show Details)

Convert to native OS window coordinates.

I changed to avoid redundant calculation in GHSOT.

Yuki Hashimoto (hzuika) retitled this revision from macOS: use native pixel size for IME candidate window to macOS: convert native OS window coordinate for Input Method.Jun 28 2021, 4:49 PM
Yuki Hashimoto (hzuika) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jul 5 2021, 1:16 PM