diff --git a/kernel/trunk/gui/window.inc b/kernel/trunk/gui/window.inc index aa970f3ce1..34489c3194 100644 --- a/kernel/trunk/gui/window.inc +++ b/kernel/trunk/gui/window.inc @@ -562,10 +562,10 @@ check_window_position: pushad ; window inside screen ? - movsx eax,word [edi+WDATA.box.left] - movsx ebx,word [edi+WDATA.box.top] - movsx ecx,word [edi+WDATA.box.width] - movsx edx,word [edi+WDATA.box.height] + mov eax, [edi+WDATA.box.left] + mov ebx, [edi+WDATA.box.top] + mov ecx, [edi+WDATA.box.width] + mov edx, [edi+WDATA.box.height] cmp ecx,[Screen_Max_X] ; check x size jbe x_size_ok diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index df5f90c264..a88372ec1f 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -3018,12 +3018,14 @@ sys_set_window: add eax,100 mov [new_window_starting],eax - mov word[edi+WDATA.box.width],bx - mov word[edi+WDATA.box.height],cx + movsx eax,bx + mov [edi+WDATA.box.width],eax + movsx eax,cx + mov [edi+WDATA.box.height],eax sar ebx,16 sar ecx,16 - mov word[edi+WDATA.box.left],bx - mov word[edi+WDATA.box.top],cx + mov [edi+WDATA.box.left],ebx + mov [edi+WDATA.box.top],ecx call check_window_position