and again fn.40: now ebx bit 31 - do not send mouse events to inactive window

git-svn-id: svn://kolibrios.org@2411 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2012-02-27 07:04:31 +00:00
parent e7a3df5e7c
commit db320404f9
2 changed files with 12 additions and 6 deletions

View File

@ -441,6 +441,7 @@ get_event_for_app: ;; used from f10,f11,f23
shl edi, 5 shl edi, 5
add edi, CURRENT_TASK ; edi is assumed as [TASK_BASE] add edi, CURRENT_TASK ; edi is assumed as [TASK_BASE]
mov ecx, [edi+TASKDATA.event_mask] mov ecx, [edi+TASKDATA.event_mask]
and ecx, 0x7FFFFFFF
.loop: ; ïîêà íå èñ÷åðïàåì âñå áèòû ìàñêè .loop: ; ïîêà íå èñ÷åðïàåì âñå áèòû ìàñêè
bsr eax, ecx ; íàõîäèì íåíóëåâîé áèò ìàñêè (31 -> 0) bsr eax, ecx ; íàõîäèì íåíóëåâîé áèò ìàñêè (31 -> 0)
jz .no_events ; èñ÷åðïàëè âñå áèòû ìàñêè, íî íè÷åãî íå íàøëè ??? jz .no_events ; èñ÷åðïàëè âñå áèòû ìàñêè, íî íè÷åãî íå íàøëè ???

View File

@ -2066,7 +2066,7 @@ sysfn_deactivate: ; 18.1 = DEACTIVATE WINDOW
call syscall_display_settings._.redraw_whole_screen call syscall_display_settings._.redraw_whole_screen
.nowindowdeactivate: .nowindowdeactivate:
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_activate: ; 18.3 = ACTIVATE WINDOW sysfn_activate: ; 18.3 = ACTIVATE WINDOW
cmp ecx, 2 cmp ecx, 2
jb .nowindowactivate jb .nowindowactivate
@ -3079,7 +3079,10 @@ nocpustart:
cmp [mouse_active], 1 cmp [mouse_active], 1
jne mouse_not_active jne mouse_not_active
mov [mouse_active], 0 mov [mouse_active], 0
xor edi, edi xor edi, edi
mov ebx, CURRENT_TASK
mov ecx, [TASK_COUNT] mov ecx, [TASK_COUNT]
movzx eax, word [WIN_POS + ecx*2] ; active window movzx eax, word [WIN_POS + ecx*2] ; active window
shl eax, 8 shl eax, 8
@ -3087,13 +3090,15 @@ nocpustart:
align 4 align 4
.set_mouse_event: .set_mouse_event:
add edi, 256 add edi, 256
test [edi+SLOT_BASE+APPDATA.event_filter], 1 add ebx, 32
jz @F test [ebx+TASKDATA.event_mask], 0x80000000
jz .set
cmp eax, edi ; skip if filtration active cmp eax, edi ; skip if filtration active
jne .set_mouse_event jne .skip
@@: .set:
or [edi+SLOT_BASE+APPDATA.event_mask], 100000b or [edi+SLOT_BASE+APPDATA.event_mask], 100000b
.skip:
loop .set_mouse_event loop .set_mouse_event
mouse_not_active: mouse_not_active:
@ -3363,7 +3368,7 @@ delay_ms: ; delay in 1/1000 sec
ret ret
align 4
set_app_param: set_app_param:
mov edi, [TASK_BASE] mov edi, [TASK_BASE]
mov eax, ebx mov eax, ebx