f.40 ebx bit 3: do not send mouse events to inactive window

git-svn-id: svn://kolibrios.org@2408 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2012-02-26 04:10:05 +00:00
parent 539071c806
commit ce677ba734
2 changed files with 23 additions and 9 deletions

View File

@ -3081,10 +3081,20 @@ nocpustart:
mov [mouse_active], 0
xor edi, edi
mov ecx, [TASK_COUNT]
set_mouse_event:
movzx eax, word [WIN_POS + ecx*2] ; active window
shl eax, 8
align 4
.set_mouse_event:
add edi, 256
or [edi+SLOT_BASE+APPDATA.event_mask], dword 100000b
loop set_mouse_event
test [edi+SLOT_BASE+APPDATA.event_filter], 1
jz @F
cmp eax, edi ; skip if filtration active
jne .set_mouse_event
@@:
or [edi+SLOT_BASE+APPDATA.event_mask], 100000b
loop .set_mouse_event
mouse_not_active:
cmp byte[BACKGROUND_CHANGED], 0
@ -3356,9 +3366,12 @@ delay_ms: ; delay in 1/1000 sec
set_app_param:
mov edi, [TASK_BASE]
mov eax, [edi + TASKDATA.event_mask]
mov [edi + TASKDATA.event_mask], ebx
mov [esp+32], eax
mov eax, ebx
btr eax, 3 ; move MOUSE_FILTRATION
mov ebx, [current_slot] ; bit into event_filter
setc byte [ebx+APPDATA.event_filter]
xchg eax, [edi + TASKDATA.event_mask] ; set new event mask
mov [esp+32], eax ; return old mask value
ret

View File

@ -125,7 +125,8 @@ struct APPDATA
wait_param dd ? ;+100 +++
tls_base dd ? ;+104
dlls_list_ptr dd ? ;+108
rb 16 ;+112
event_filter dd ? ;+112
rb 12 ;+116
wnd_shape dd ? ;+128
wnd_shape_scale dd ? ;+132