Reduce flickering while moving windows

This commit is contained in:
Juhani Krekelä 2023-03-23 12:28:42 +02:00
parent 1ef3695608
commit f4df788d11
1 changed files with 15 additions and 7 deletions

View File

@ -297,16 +297,24 @@ resize:
; si = pointer to window structure
move:
push dx
mov [si + window.y], bx
mov [si + window.x], cx
mov dx, [si + window.res_x]
sub [si + window.x], dx
mov dx, cx
sub dx, [si + window.res_x]
.not_underflow:
cmp [si + window.y], bx
jne .change
cmp [si + window.x], dx
jne .change
jmp .end
.change
mov [si + window.y], bx
mov [si + window.x], dx
call request_redraw
.end:
pop dx
call request_redraw
ret
; in: