From db320404f9044a67b28b24ce7a97ba20b2c5ff9c Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Mon, 27 Feb 2012 07:04:31 +0000 Subject: [PATCH] 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 --- kernel/trunk/gui/event.inc | 1 + kernel/trunk/kernel.asm | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/kernel/trunk/gui/event.inc b/kernel/trunk/gui/event.inc index 1d36626fc4..6ce19f90b9 100644 --- a/kernel/trunk/gui/event.inc +++ b/kernel/trunk/gui/event.inc @@ -441,6 +441,7 @@ get_event_for_app: ;; used from f10,f11,f23 shl edi, 5 add edi, CURRENT_TASK ; edi is assumed as [TASK_BASE] mov ecx, [edi+TASKDATA.event_mask] + and ecx, 0x7FFFFFFF .loop: ; пока не исчерпаем все биты маски bsr eax, ecx ; находим ненулевой бит маски (31 -> 0) jz .no_events ; исчерпали все биты маски, но ничего не нашли ??? diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 54c938c293..9ad55e0f72 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -2066,7 +2066,7 @@ sysfn_deactivate: ; 18.1 = DEACTIVATE WINDOW call syscall_display_settings._.redraw_whole_screen .nowindowdeactivate: ret - ;------------------------------------------------------------------------------ + ;------------------------------------------------------------------------------ sysfn_activate: ; 18.3 = ACTIVATE WINDOW cmp ecx, 2 jb .nowindowactivate @@ -3079,7 +3079,10 @@ nocpustart: cmp [mouse_active], 1 jne mouse_not_active mov [mouse_active], 0 + xor edi, edi + mov ebx, CURRENT_TASK + mov ecx, [TASK_COUNT] movzx eax, word [WIN_POS + ecx*2] ; active window shl eax, 8 @@ -3087,13 +3090,15 @@ nocpustart: align 4 .set_mouse_event: add edi, 256 - test [edi+SLOT_BASE+APPDATA.event_filter], 1 - jz @F + add ebx, 32 + test [ebx+TASKDATA.event_mask], 0x80000000 + jz .set cmp eax, edi ; skip if filtration active - jne .set_mouse_event -@@: + jne .skip +.set: or [edi+SLOT_BASE+APPDATA.event_mask], 100000b +.skip: loop .set_mouse_event mouse_not_active: @@ -3363,7 +3368,7 @@ delay_ms: ; delay in 1/1000 sec ret - +align 4 set_app_param: mov edi, [TASK_BASE] mov eax, ebx