mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 16:47:17 +00:00
imm32: Update the IME composition window position after drawing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53860
This commit is contained in:
parent
354a8bb1f4
commit
bbfb15a5e5
|
@ -186,7 +186,7 @@ static UINT ime_set_composition_status( HIMC himc, BOOL composition )
|
||||||
static void ime_ui_paint( HIMC himc, HWND hwnd )
|
static void ime_ui_paint( HIMC himc, HWND hwnd )
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT ps;
|
||||||
RECT rect;
|
RECT rect, new_rect;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
HMONITOR monitor;
|
HMONITOR monitor;
|
||||||
MONITORINFO mon_info;
|
MONITORINFO mon_info;
|
||||||
|
@ -201,6 +201,7 @@ static void ime_ui_paint( HIMC himc, HWND hwnd )
|
||||||
|
|
||||||
GetClientRect( hwnd, &rect );
|
GetClientRect( hwnd, &rect );
|
||||||
FillRect( hdc, &rect, (HBRUSH)(COLOR_WINDOW + 1) );
|
FillRect( hdc, &rect, (HBRUSH)(COLOR_WINDOW + 1) );
|
||||||
|
new_rect = rect;
|
||||||
|
|
||||||
if ((str = input_context_get_comp_str( ctx, FALSE, &len )))
|
if ((str = input_context_get_comp_str( ctx, FALSE, &len )))
|
||||||
{
|
{
|
||||||
|
@ -233,6 +234,7 @@ static void ime_ui_paint( HIMC himc, HWND hwnd )
|
||||||
rect.top = cpt.y;
|
rect.top = cpt.y;
|
||||||
rect.right = rect.left + pt.x;
|
rect.right = rect.left + pt.x;
|
||||||
rect.bottom = rect.top + pt.y;
|
rect.bottom = rect.top + pt.y;
|
||||||
|
offset.x = offset.y = 0;
|
||||||
monitor = MonitorFromPoint( cpt, MONITOR_DEFAULTTOPRIMARY );
|
monitor = MonitorFromPoint( cpt, MONITOR_DEFAULTTOPRIMARY );
|
||||||
}
|
}
|
||||||
else /* CFS_DEFAULT */
|
else /* CFS_DEFAULT */
|
||||||
|
@ -283,8 +285,7 @@ static void ime_ui_paint( HIMC himc, HWND hwnd )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetWindowPos( hwnd, HWND_TOPMOST, rect.left, rect.top, rect.right - rect.left,
|
new_rect = rect;
|
||||||
rect.bottom - rect.top, SWP_NOACTIVATE );
|
|
||||||
TextOutW( hdc, offset.x, offset.y, str, len );
|
TextOutW( hdc, offset.x, offset.y, str, len );
|
||||||
|
|
||||||
if (font) SelectObject( hdc, font );
|
if (font) SelectObject( hdc, font );
|
||||||
|
@ -293,6 +294,10 @@ static void ime_ui_paint( HIMC himc, HWND hwnd )
|
||||||
|
|
||||||
EndPaint( hwnd, &ps );
|
EndPaint( hwnd, &ps );
|
||||||
ImmUnlockIMC( himc );
|
ImmUnlockIMC( himc );
|
||||||
|
|
||||||
|
if (!EqualRect( &rect, &new_rect ))
|
||||||
|
SetWindowPos( hwnd, HWND_TOPMOST, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
|
||||||
|
new_rect.bottom - new_rect.top, SWP_NOACTIVATE );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ime_ui_update_window( INPUTCONTEXT *ctx, HWND hwnd )
|
static void ime_ui_update_window( INPUTCONTEXT *ctx, HWND hwnd )
|
||||||
|
|
Loading…
Reference in a new issue