first call to sysfn 0 activates window

git-svn-id: svn://kolibrios.org@569 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2007-07-07 11:42:26 +00:00
parent 7651ba5227
commit 390d9aa3a7
2 changed files with 15 additions and 27 deletions

View File

@ -1089,33 +1089,19 @@ proc set_app_params stdcall,slot:dword, params:dword,\
mov [ebx+REG_SS], dword app_data
lea ecx, [ebx+REG_RET]
mov ebx, [slot]
shl ebx, 8
mov [ebx+SLOT_BASE+APPDATA.saved_esp], ecx
;flush keyboard and buttons queue
mov [KEY_COUNT],byte 0
mov [BTN_COUNT],byte 0
mov edi,[slot]
shl edi,5
add edi,window_data
mov ebx,[slot]
movzx esi,word [WIN_STACK+ebx*2]
lea esi,[WIN_POS+esi*2]
call windowactivate ;gui initialization
mov ebx, [slot]
shl ebx, 5
mov [CURRENT_TASK+ebx+0xa],byte 0 ;set process state - running
mov [ebx*8+SLOT_BASE+APPDATA.saved_esp], ecx
xor ecx, ecx ; process state - running
; set if debuggee
mov eax, [flags]
test byte [flags], 1
jz .no_debug
mov [CURRENT_TASK+ebx+0xa],byte 1 ;set process state - suspended
inc ecx ; process state - suspended
mov eax,[CURRENT_TASK]
mov [SLOT_BASE+ebx*8+0xac],eax ;set debugger PID - current
mov [SLOT_BASE+ebx*8+APPDATA.debugger_slot],eax
.no_debug:
mov [CURRENT_TASK+ebx+TASKDATA.state], cl
;mov esi,new_process_running
;call sys_msg_board_str ;output information about succefull startup
DEBUGF 1,"%s",new_process_running
@ -1123,4 +1109,3 @@ proc set_app_params stdcall,slot:dword, params:dword,\
endp
include "debug.inc"

View File

@ -2963,7 +2963,10 @@ sys_drawwindow:
jne nosyswV
draw_skin_window:
; parameter for drawwindow_IV
inc [mouse_pause]
call [disable_mouse]
call sys_set_window
call [disable_mouse]
push 0
mov edi, [TASK_COUNT]
movzx edi, word [WIN_POS + edi*2]
@ -2971,11 +2974,6 @@ sys_drawwindow:
jne @f
inc dword [esp]
@@:
inc [mouse_pause]
call [disable_mouse]
call sys_set_window
call [disable_mouse]
call drawwindow_IV
;dec [mouse_pause]
;call [draw_pointer]
@ -3216,6 +3214,11 @@ sys_set_window:
movsd
pop edi esi ecx
mov esi, [CURRENT_TASK]
movzx esi, word [WIN_STACK+esi*2]
lea esi, [WIN_POS+esi*2]
call waredraw
push eax ebx ecx edx
;;; mov eax, 1
;;; call delay_hs