Fix: IME conversion candidate window not correctly placed on macOS
Blender needs 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. Differential Revision: https://developer.blender.org/D11696
This commit is contained in:
@@ -2403,6 +2403,10 @@ void wm_window_IME_begin(wmWindow *win, int x, int y, int w, int h, bool complet
|
||||
{
|
||||
BLI_assert(win);
|
||||
|
||||
/* Convert to native OS window coordinates. */
|
||||
float fac = GHOST_GetNativePixelSize(win->ghostwin);
|
||||
x /= fac;
|
||||
y /= fac;
|
||||
GHOST_BeginIME(win->ghostwin, x, win->sizey - y, w, h, complete);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user