Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5201 → Rev 5200

/kernel/branches/Kolibri-acpi/gui/window.inc
26,7 → 26,7
}
 
uglobal
common_colours rd 48
common_colours rd 32
draw_limits RECT
endg
 
34,7 → 34,7
;------------------------------------------------------------------------------
syscall_draw_window: ;///// system function 0 /////////////////////////////////
;------------------------------------------------------------------------------
;? <description>.
;? <description>
;------------------------------------------------------------------------------
mov eax, edx
shr eax, 24
173,10 → 173,7
syscall_display_settings.02:
dec ebx
mov esi, ecx
cmp edx, 192
jnae @f
mov edx, 192 ; max size
@@:
and edx, 127
mov edi, common_colours
mov ecx, edx
rep movsb
186,10 → 183,7
align 4
syscall_display_settings.03:
mov edi, ecx
cmp edx, 192
jnae @f
mov edx, 192 ; max size
@@:
and edx, 127
mov esi, common_colours
mov ecx, edx
rep movsb
215,7 → 209,7
syscall_display_settings.06:
xor esi, esi
 
mov edi, [Screen_Max_X]
mov edi, [_display.width]
mov eax, ecx
movsx ebx, ax
sar eax, 16
239,7 → 233,7
;--------------------------------------
align 4
.check_horizontal:
mov edi, [Screen_Max_Y]
mov edi, [_display.height]
mov eax, edx
movsx ebx, ax
sar eax, 16
300,8 → 294,8
syscall_display_settings._.calculate_whole_screen:
xor eax, eax
xor ebx, ebx
mov ecx, [Screen_Max_X]
mov edx, [Screen_Max_Y]
mov ecx, [_display.width]
mov edx, [_display.height]
jmp calculatescreen
;------------------------------------------------------------------------------
align 4
309,9 → 303,11
xor eax, eax
mov [draw_limits.left], eax
mov [draw_limits.top], eax
mov eax, [Screen_Max_X]
mov eax, [_display.width]
dec eax
mov [draw_limits.right], eax
mov eax, [Screen_Max_Y]
mov eax, [_display.height]
dec eax
mov [draw_limits.bottom], eax
mov eax, window_data
jmp redrawscreen
590,9 → 586,9
 
mov eax, [edi + WDATA.box.left]
add eax, [edi + WDATA.box.width]
mov ebx, [Screen_Max_X]
mov ebx, [_display.width]
cmp eax, ebx
jle .fix_vertical
jl .fix_vertical
mov eax, [edi + WDATA.box.width]
sub eax, ebx
jle @f
607,9 → 603,9
.fix_vertical:
mov eax, [edi + WDATA.box.top]
add eax, [edi + WDATA.box.height]
mov ebx, [Screen_Max_Y]
mov ebx, [_display.height]
cmp eax, ebx
jle .fix_client_box
jl .fix_client_box
mov eax, [edi + WDATA.box.height]
sub eax, ebx
jle @f
823,8 → 819,12
jnz .exit
 
; does client area have a positive size on screen?
cmp [esi + WDATA.box.height], 21
jle .exit
mov edx, [esi + WDATA.box.top]
add edx, 21 + 5
mov ebx, [esi + WDATA.box.top]
add ebx, [esi + WDATA.box.height]
cmp edx, ebx
jg .exit
 
; okay, let's draw it
mov eax, 1
1718,9 → 1718,9
mov ecx, [edi + WDATA.box.width]
mov edx, [edi + WDATA.box.height]
 
mov esi, [Screen_Max_X]
mov esi, [_display.width]
cmp ecx, esi
ja .fix_width_high
jae .fix_width_high
;--------------------------------------
align 4
.check_left:
1732,9 → 1732,9
;--------------------------------------
align 4
.check_height:
mov esi, [Screen_Max_Y]
mov esi, [_display.height]
cmp edx, esi
ja .fix_height_high
jae .fix_height_high
;--------------------------------------
align 4
.check_top:
1992,7 → 1992,7
 
sub ebp, [ff_xsz]
add ebp, [ff_x]
add ebp, [Screen_Max_X] ; screen.x
add ebp, [_display.width] ; screen.x
inc ebp
inc ebx
cmp ebx, [ff_ysz]