Commit d84f8dcc authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11: Early return control flow in xic_preedit_caret.

parent 994d7990
...@@ -215,46 +215,45 @@ static int xic_preedit_draw( XIC xic, XPointer user, XPointer arg ) ...@@ -215,46 +215,45 @@ static int xic_preedit_draw( XIC xic, XPointer user, XPointer arg )
static int xic_preedit_caret( XIC xic, XPointer user, XPointer arg ) static int xic_preedit_caret( XIC xic, XPointer user, XPointer arg )
{ {
XIMPreeditCaretCallbackStruct *P_C = (void *)arg; XIMPreeditCaretCallbackStruct *params = (void *)arg;
HWND hwnd = (HWND)user; HWND hwnd = (HWND)user;
int pos;
TRACE( "xic %p, hwnd %p, arg %p\n", xic, hwnd, arg ); TRACE( "xic %p, hwnd %p, arg %p\n", xic, hwnd, arg );
if (P_C) if (!params) return 0;
pos = x11drv_client_call( client_ime_get_cursor_pos, 0 );
switch (params->direction)
{ {
int pos = x11drv_client_call( client_ime_get_cursor_pos, 0 ); case XIMForwardChar:
TRACE("pos: %d\n", pos); case XIMForwardWord:
switch(P_C->direction) pos++;
{ break;
case XIMForwardChar: case XIMBackwardChar:
case XIMForwardWord: case XIMBackwardWord:
pos++; pos--;
break; break;
case XIMBackwardChar: case XIMLineStart:
case XIMBackwardWord: pos = 0;
pos--; break;
break; case XIMAbsolutePosition:
case XIMLineStart: pos = params->position;
pos = 0; break;
break; case XIMDontChange:
case XIMAbsolutePosition: params->position = pos;
pos = P_C->position; return 0;
break; case XIMCaretUp:
case XIMDontChange: case XIMCaretDown:
P_C->position = pos; case XIMPreviousLine:
return 0; case XIMNextLine:
case XIMCaretUp: case XIMLineEnd:
case XIMCaretDown: FIXME( "Not implemented\n" );
case XIMPreviousLine: break;
case XIMNextLine:
case XIMLineEnd:
FIXME("Not implemented\n");
break;
}
x11drv_client_call( client_ime_set_cursor_pos, pos );
P_C->position = pos;
} }
TRACE("Finished\n"); x11drv_client_call( client_ime_set_cursor_pos, pos );
params->position = pos;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment