diff --git a/kernel/trunk/gui/mouse.inc b/kernel/trunk/gui/mouse.inc index 8dc359fe26..68590dd102 100644 --- a/kernel/trunk/gui/mouse.inc +++ b/kernel/trunk/gui/mouse.inc @@ -371,6 +371,7 @@ mouse._.move_handler: cmp eax, [_display.width] jl @f sub eax, [_display.width] + inc eax sub [mouse.active_sys_window.new_box.left], eax @@: mov eax, [mouse.active_sys_window.new_box.top] @@ -383,6 +384,7 @@ mouse._.move_handler: cmp eax, [_display.height] jl .call_window_handler sub eax, [_display.height] + inc eax sub [mouse.active_sys_window.new_box.top], eax jmp .call_window_handler diff --git a/kernel/trunk/gui/window.inc b/kernel/trunk/gui/window.inc index 5ee563b0dd..6b1e7e19b0 100644 --- a/kernel/trunk/gui/window.inc +++ b/kernel/trunk/gui/window.inc @@ -1686,7 +1686,8 @@ align 4 align 4 .fix_width_high: mov ecx, esi - mov [edi + WDATA.box.width], esi + dec ecx + mov [edi + WDATA.box.width], ecx jmp .check_left ;-------------------------------------- align 4 @@ -1699,13 +1700,15 @@ align 4 .fix_left_high: mov eax, esi sub eax, ecx + dec eax mov [edi + WDATA.box.left], eax jmp .check_height ;-------------------------------------- align 4 .fix_height_high: mov edx, esi - mov [edi + WDATA.box.height], esi + dec edx + mov [edi + WDATA.box.height], edx jmp .check_top ;-------------------------------------- align 4 @@ -1718,6 +1721,7 @@ align 4 .fix_top_high: mov ebx, esi sub ebx, edx + dec ebx mov [edi + WDATA.box.top], ebx jmp .exit ;------------------------------------------------------------------------------