forked from KolibriOS/kolibrios
replacing TASKDATA.event_mask with APPDATA.event_mask and cleared code
git-svn-id: svn://kolibrios.org@9614 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
df70a59fd5
commit
4afc0dd84b
@ -906,7 +906,6 @@ common_app_entry:
|
|||||||
mov ebx, [current_slot]
|
mov ebx, [current_slot]
|
||||||
cmp [ebx+APPDATA.debugger_slot], 0
|
cmp [ebx+APPDATA.debugger_slot], 0
|
||||||
je .exit
|
je .exit
|
||||||
;mov eax, [current_slot]
|
|
||||||
mov [ebx+APPDATA.state], TSTATE_RUN_SUSPENDED
|
mov [ebx+APPDATA.state], TSTATE_RUN_SUSPENDED
|
||||||
mov eax, [TASK_BASE]
|
mov eax, [TASK_BASE]
|
||||||
mov [eax+TASKDATA.state], TSTATE_RUN_SUSPENDED
|
mov [eax+TASKDATA.state], TSTATE_RUN_SUSPENDED
|
||||||
@ -983,8 +982,6 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword
|
|||||||
mov [ebx+SLOT_BASE+APPDATA.cur_dir], eax
|
mov [ebx+SLOT_BASE+APPDATA.cur_dir], eax
|
||||||
rep movsd
|
rep movsd
|
||||||
|
|
||||||
;shr ebx, 3
|
|
||||||
;mov dword [TASK_TABLE+ebx+TASKDATA.mem_start], 0
|
|
||||||
mov dword [ebx+SLOT_BASE+APPDATA.mem_start], 0
|
mov dword [ebx+SLOT_BASE+APPDATA.mem_start], 0
|
||||||
mov [ebx+SLOT_BASE+APPDATA.event_mask], dword 1+2+4;set default event flags (see 40 function)
|
mov [ebx+SLOT_BASE+APPDATA.event_mask], dword 1+2+4;set default event flags (see 40 function)
|
||||||
inc dword [process_number]
|
inc dword [process_number]
|
||||||
@ -1001,9 +998,6 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword
|
|||||||
mov [ebx+window_data+WDATA.fl_wstate], WSTATE_NORMAL
|
mov [ebx+window_data+WDATA.fl_wstate], WSTATE_NORMAL
|
||||||
mov [ebx+window_data+WDATA.fl_redraw], 1
|
mov [ebx+window_data+WDATA.fl_redraw], 1
|
||||||
add ebx, TASK_TABLE ;ebx - pointer to information about process
|
add ebx, TASK_TABLE ;ebx - pointer to information about process
|
||||||
;mov [ebx+TASKDATA.wnd_number], al;set window number on screen = process slot
|
|
||||||
|
|
||||||
mov [ebx+TASKDATA.event_mask], dword 1+2+4;set default event flags (see 40 function)
|
|
||||||
|
|
||||||
mov eax, [process_number] ; delete
|
mov eax, [process_number] ; delete
|
||||||
mov [ebx+TASKDATA.pid], eax ;set PID ;
|
mov [ebx+TASKDATA.pid], eax ;set PID ;
|
||||||
|
@ -513,11 +513,9 @@ get_event_for_app: ;; used from f10,f11,f23
|
|||||||
;retval:
|
;retval:
|
||||||
; eax - event number (=0 => no events)
|
; eax - event number (=0 => no events)
|
||||||
movzx edi, bh ; bh is assumed as [current_slot_idx]
|
movzx edi, bh ; bh is assumed as [current_slot_idx]
|
||||||
;shl edi, 8
|
mov ecx, [ebx+APPDATA.event_mask]
|
||||||
;mov ecx, [edi+SLOT_BASE+APPDATA.event_mask]
|
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
add edi, TASK_TABLE ; edi is assumed as [TASK_BASE]
|
add edi, TASK_TABLE ; edi is assumed as [TASK_BASE]
|
||||||
mov ecx, [edi+TASKDATA.event_mask]
|
|
||||||
and ecx, 0x7FFFFFFF
|
and ecx, 0x7FFFFFFF
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -557,10 +555,8 @@ align 4
|
|||||||
align 4
|
align 4
|
||||||
.mouse_check: ; Mouse 5+1=6
|
.mouse_check: ; Mouse 5+1=6
|
||||||
push eax
|
push eax
|
||||||
;mov eax, [current_slot]
|
mov eax, [current_slot]
|
||||||
;mov eax, [eax + APPDATA.event_mask]
|
mov eax, [eax + APPDATA.event_mask]
|
||||||
mov eax, [TASK_BASE]
|
|
||||||
mov eax, [eax + TASKDATA.event_mask]
|
|
||||||
test eax, 0x80000000 ; bit 31: active/inactive filter f.40
|
test eax, 0x80000000 ; bit 31: active/inactive filter f.40
|
||||||
jz @f
|
jz @f
|
||||||
pop eax
|
pop eax
|
||||||
|
@ -1186,7 +1186,6 @@ proc setup_os_slot
|
|||||||
mov eax, edx
|
mov eax, edx
|
||||||
shr eax, 3
|
shr eax, 3
|
||||||
add eax, TASK_TABLE - (SLOT_BASE shr 3)
|
add eax, TASK_TABLE - (SLOT_BASE shr 3)
|
||||||
;mov [eax+TASKDATA.wnd_number], dh
|
|
||||||
mov byte [eax+TASKDATA.pid], dh
|
mov byte [eax+TASKDATA.pid], dh
|
||||||
|
|
||||||
ret
|
ret
|
||||||
@ -1549,7 +1548,6 @@ draw_num_text:
|
|||||||
add edx, esp
|
add edx, esp
|
||||||
mov ebx, [esp+64+32-8+4]
|
mov ebx, [esp+64+32-8+4]
|
||||||
; add window start x & y
|
; add window start x & y
|
||||||
;mov ecx, [TASK_BASE]
|
|
||||||
|
|
||||||
mov edi, [current_slot_idx]
|
mov edi, [current_slot_idx]
|
||||||
mov ecx, edi
|
mov ecx, edi
|
||||||
@ -1614,8 +1612,6 @@ sys_setup:
|
|||||||
dec ebx
|
dec ebx
|
||||||
jnz @f
|
jnz @f
|
||||||
|
|
||||||
;mov edi, [TASK_BASE]
|
|
||||||
;mov eax, [edi+TASKDATA.mem_start]
|
|
||||||
mov edi, [current_slot]
|
mov edi, [current_slot]
|
||||||
mov eax, [edi+APPDATA.mem_start]
|
mov eax, [edi+APPDATA.mem_start]
|
||||||
add eax, edx
|
add eax, edx
|
||||||
@ -1713,8 +1709,6 @@ sys_getsetup:
|
|||||||
dec ebx
|
dec ebx
|
||||||
jnz @f
|
jnz @f
|
||||||
|
|
||||||
;mov edi, [TASK_BASE]
|
|
||||||
;mov ebx, [edi+TASKDATA.mem_start]
|
|
||||||
mov edi, [current_slot]
|
mov edi, [current_slot]
|
||||||
mov ebx, [edi+APPDATA.mem_start]
|
mov ebx, [edi+APPDATA.mem_start]
|
||||||
add ebx, edx
|
add ebx, edx
|
||||||
@ -2311,10 +2305,6 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table
|
|||||||
.exit:
|
.exit:
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;sysfn_lastkey: ; 18.12 = return 0 (backward compatibility)
|
|
||||||
; and dword [esp+32], 0
|
|
||||||
; ret
|
|
||||||
;------------------------------------------------------------------------------
|
|
||||||
sysfn_getversion: ; 18.13 = get kernel ID and version
|
sysfn_getversion: ; 18.13 = get kernel ID and version
|
||||||
; if given memory address belongs to kernel then error
|
; if given memory address belongs to kernel then error
|
||||||
stdcall is_region_userspace, ecx, version_end-version_inf
|
stdcall is_region_userspace, ecx, version_end-version_inf
|
||||||
@ -2698,7 +2688,6 @@ sys_cpuusage:
|
|||||||
|
|
||||||
; Event mask (+71)
|
; Event mask (+71)
|
||||||
mov EAX, dword [ecx*8 + SLOT_BASE + APPDATA.event_mask]
|
mov EAX, dword [ecx*8 + SLOT_BASE + APPDATA.event_mask]
|
||||||
mov EAX, dword [ECX+TASK_TABLE+TASKDATA.event_mask] ; delete
|
|
||||||
stosd
|
stosd
|
||||||
|
|
||||||
; Keyboard mode (+75)
|
; Keyboard mode (+75)
|
||||||
@ -2941,7 +2930,7 @@ align 4
|
|||||||
.set_mouse_event:
|
.set_mouse_event:
|
||||||
add edi, sizeof.APPDATA
|
add edi, sizeof.APPDATA
|
||||||
add ebx, sizeof.TASKDATA
|
add ebx, sizeof.TASKDATA
|
||||||
test [ebx+TASKDATA.event_mask], 0x80000000
|
test [edi + SLOT_BASE + APPDATA.event_mask], 0x80000000
|
||||||
jz .pos_filter
|
jz .pos_filter
|
||||||
|
|
||||||
cmp edi, [esp] ; skip if filtration active
|
cmp edi, [esp] ; skip if filtration active
|
||||||
@ -2949,7 +2938,7 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.pos_filter:
|
.pos_filter:
|
||||||
test [ebx+TASKDATA.event_mask], 0x40000000
|
test [edi + SLOT_BASE + APPDATA.event_mask], 0x40000000
|
||||||
jz .set
|
jz .set
|
||||||
|
|
||||||
mov esi, [ebx-twdw+WDATA.box.left]
|
mov esi, [ebx-twdw+WDATA.box.left]
|
||||||
@ -3413,11 +3402,8 @@ delay_ms: ; delay in 1/1000 sec
|
|||||||
align 4
|
align 4
|
||||||
set_app_param:
|
set_app_param:
|
||||||
mov edi, [current_slot]
|
mov edi, [current_slot]
|
||||||
mov edi, [TASK_BASE]
|
xchg ebx, [edi + APPDATA.event_mask] ; set new event mask
|
||||||
mov eax, ebx
|
mov [esp+32], ebx ; return old mask value
|
||||||
;xchg eax, [edi + APPDATA.event_mask] ; set new event mask
|
|
||||||
xchg eax, [edi + TASKDATA.event_mask] ; set new event mask
|
|
||||||
mov [esp+32], eax ; return old mask value
|
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user