Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9850 → Rev 9910

/kernel/trunk/gui/background.inc
20,12 → 20,12
align 4
sys_background:
cmp ebx, 1 ; BACKGROUND SIZE
jnz nosb1
jnz .nosb1
test ecx, ecx
jz sbgrr
jz .sbgrr
 
test edx, edx
jz sbgrr
jz .sbgrr
;--------------------------------------
align 4
@@:
98,13 → 98,13
mov [bgrlock], 0
;--------------------------------------
align 4
sbgrr:
.sbgrr:
ret
;--------------------------------------
align 4
nosb1:
.nosb1:
cmp ebx, 2 ; SET PIXEL
jnz nosb2
jnz .nosb2
 
mov eax, [img_background]
test ecx, ecx
115,8 → 115,8
align 4
@@:
mov ebx, [mem_BACKGROUND]
add ebx, 4095
and ebx, -4096
add ebx, PAGE_SIZE-1
and ebx, -PAGE_SIZE
sub ebx, 4
cmp ecx, ebx
ja .ret
132,7 → 132,7
ret
;--------------------------------------
align 4
nosb2:
.nosb2:
cmp ebx, 3 ; DRAW BACKGROUND
jnz nosb3
;--------------------------------------
206,7 → 206,7
cmp [img_background], static_background_data
jz .nomem
stdcall user_alloc, [mem_BACKGROUND]
mov [esp+32], eax
mov [esp + SYSCALL_STACK.eax], eax
test eax, eax
jz .nomem
mov ebx, eax
276,7 → 276,7
pop eax
and dword [page_tabs+(eax-1)*4], not MEM_BLOCK_DONT_FREE
stdcall user_free, ebx
mov [esp+32], eax
mov [esp + SYSCALL_STACK.eax], eax
and [bgrlockpid], 0
mov [bgrlock], 0
ret
283,7 → 283,7
;--------------------------------------
align 4
.err:
and dword [esp+32], 0
and dword [esp + SYSCALL_STACK.eax], 0
ret
;-------------------------------------
align 4
294,16 → 294,16
mov ecx, [current_slot]
xor eax, eax
xchg eax, [ecx+APPDATA.draw_bgr_x]
mov [esp + 32], eax ; eax = [left]*65536 + [right]
mov [esp + SYSCALL_STACK.eax], eax ; eax = [left]*65536 + [right]
xor eax, eax
xchg eax, [ecx+APPDATA.draw_bgr_y]
mov [esp + 20], eax ; ebx = [top]*65536 + [bottom]
mov [esp + SYSCALL_STACK.ebx], eax ; ebx = [top]*65536 + [bottom]
ret
;---------------------------------------
align 4
nosb8:
cmp ebx, 9
jnz nosb9
jnz .exit
; ecx = [left]*65536 + [right]
; edx = [top]*65536 + [bottom]
mov eax, [_display.width]
343,10 → 343,6
align 4
.exit:
ret
;--------------------------------------
align 4
nosb9:
ret
;------------------------------------------------------------------------------
 
 
384,7 → 380,7
mov eax, [BgrDataWidth]
shl eax, 16
mov ax, word [BgrDataHeight]
mov [esp+32], eax
mov [esp + SYSCALL_STACK.eax], eax
ret
;---------------------------------------
align 4
400,8 → 396,8
align 4
@@:
mov ebx, [mem_BACKGROUND]
add ebx, 4095
and ebx, -4096
add ebx, PAGE_SIZE-1
and ebx, -PAGE_SIZE
sub ebx, 4
cmp ecx, ebx
ja .ret
409,7 → 405,7
mov eax, [ecx+eax]
 
and eax, 0xFFFFFF
mov [esp+32], eax
mov [esp + SYSCALL_STACK.eax], eax
align 4
.ret:
ret
456,8 → 452,8
 
; check bounds
mov ebx, [mem_BACKGROUND]
add ebx, 4095
and ebx, -4096
add ebx, PAGE_SIZE-1
and ebx, -PAGE_SIZE
sub ebx, 4
add eax, [.subrect_startptr]
cmp eax, ebx
495,7 → 491,7
jmp .copy_rect
.end_copy_rect:
xor eax, eax
mov [esp+32], eax
mov [esp + SYSCALL_STACK.eax], eax
;--------------------------------------
align 4
.fail_39_3:
513,7 → 509,7
;--------------------------------------
align 4
.nogb4:
mov [esp+32], eax
mov [esp + SYSCALL_STACK.eax], eax
ret
;-----------------------------------------------------------------------------
 
/kernel/trunk/gui/event.inc
480,7 → 480,7
cli ; the right to hope to disable interrupts, as when called from shed
call get_event_for_app
popfd
mov [esp+32], eax
mov [esp + SYSCALL_STACK.eax], eax
ret
;-----------------------------------------------------------------------------
align 4
492,7 → 492,7
call unprotect_from_terminate
mov edx, get_event_for_app; wait_test
call Wait_events_ex ; ebx - timeout
mov [esp+32], eax
mov [esp + SYSCALL_STACK.eax], eax
call protect_from_terminate
ret
;-----------------------------------------------------------------------------
/kernel/trunk/gui/window.inc
284,10 → 284,10
; out: eax = pack[left, right], ebx = pack[top, bottom]
mov eax, [screen_workarea.left - 2]
mov ax, word[screen_workarea.right]
mov [esp + 32], eax
mov [esp + SYSCALL_STACK.eax], eax
mov eax, [screen_workarea.top - 2]
mov ax, word[screen_workarea.bottom]
mov [esp + 20], eax
mov [esp + SYSCALL_STACK.ebx], eax
ret
 
.setScreenWorkingArea:
346,9 → 346,9
.getSkinMargins:
; out: eax = pack[left, right], ebx = pack[top, bottom]
mov eax, [_skinmargins + 0]
mov [esp + 32], eax
mov [esp + SYSCALL_STACK.eax], eax
mov eax, [_skinmargins + 4]
mov [esp + 20], eax
mov [esp + SYSCALL_STACK.ebx], eax
ret
 
.setSkin:
355,7 → 355,7
; in: ecx -> file path string
mov ebx, ecx
call read_skin_file
mov [esp + 32], eax
mov [esp + SYSCALL_STACK.eax], eax
test eax, eax
jnz .ret
call .calculateScreen
364,7 → 364,7
.getFontSmoothing:
xor eax, eax
mov al, [fontSmoothing]
mov [esp + 32], eax
mov [esp + SYSCALL_STACK.eax], eax
ret
 
.setFontSmoothing:
374,7 → 374,7
.getFontSize:
xor eax, eax
mov al, [fontSize]
mov [esp + 32], eax
mov [esp + SYSCALL_STACK.eax], eax
ret
 
.setFontSize:
393,7 → 393,7
jz @f
mov ebx, [esp]
call read_skin_file
mov [esp + 32 + 4], eax
mov [esp + SYSCALL_STACK.eax + 4], eax
@@:
call kernel_free
call .calculateScreen
505,7 → 505,7
 
align 4
set_window_defaults:
mov byte [window_data + 0x20 + WDATA.cl_titlebar + 3], 1 ; desktop is not movable
mov byte [window_data + sizeof.WDATA + WDATA.cl_titlebar + 3], 1 ; desktop is not movable
push eax ecx
xor eax, eax
mov ecx, WIN_STACK
1090,10 → 1090,10
movzx edi, word[WIN_POS + eax * 2]
shl edi, BSF sizeof.WDATA
; it is a unused slot?
cmp byte [edi*8 + SLOT_BASE + APPDATA.state], TSTATE_FREE
cmp byte [SLOT_BASE + edi*8 + APPDATA.state], TSTATE_FREE
je @f
; it is a hidden thread?
lea esi, [edi*8+SLOT_BASE+APPDATA.app_name]
lea esi, [SLOT_BASE + edi*8 + APPDATA.app_name]
cmp [esi], byte '@'
je @f
; is it already minimized?
2548,6 → 2548,3
 
add esp, 4 ;dword for 0/1 - set_screen/fl_redraw
ret