diff --git a/src/widget/textbox.c b/src/widget/textbox.c index 25c6e8d5..c621ce4b 100755 --- a/src/widget/textbox.c +++ b/src/widget/textbox.c @@ -163,7 +163,7 @@ TextBox_TextLayer_Click( LCUI_Widget *widget, LCUI_WidgetEvent *event ) pos.x = pos.y = 0; } else { /* 全局坐标转换成相对坐标 */ - pos = GlobalPos_ConvTo_RelativePos( tb->text, event->drag.cursor_pos ); + pos = Widget_ToRelPos( tb->text, event->drag.cursor_pos ); } //printf("pos: %d,%d\n", pos.x, pos.y); /* 根据像素坐标,设定文本光标的位置 */ diff --git a/src/widget/window.c b/src/widget/window.c index f977fe28..677ea480 100755 --- a/src/widget/window.c +++ b/src/widget/window.c @@ -116,7 +116,7 @@ Window_ExecMove(LCUI_Widget *titlebar, LCUI_WidgetEvent *event) /* 将偏移坐标加在窗口全局坐标上,得出窗口的新全局坐标 */ pos = Pos_Add( pos, offset ); /* 转换成在容器区域内的相对坐标 */ - pos = GlobalPos_ConvTo_RelativePos( window, pos ); + pos = Widget_ToRelPos( window, pos ); /* 解除之前设定的align */ Widget_SetAlign( window, ALIGN_NONE, Pos(0,0) ); /* 移动窗口的位置 */