diff --git a/kernel/trunk/hid/mousedrv.inc b/kernel/trunk/hid/mousedrv.inc index 8b6e819291..2d5d27065c 100644 --- a/kernel/trunk/hid/mousedrv.inc +++ b/kernel/trunk/hid/mousedrv.inc @@ -37,7 +37,7 @@ include 'm_com2.inc' draw_mouse_under: ; return old picture - + pushad xor ecx,ecx @@ -260,11 +260,14 @@ combine_colors: __sys_disable_mouse: + - cli - pushad cmp dword [0xf204],dword 0 - jne no_mouse_disable + je @f + ret + @@: +; cli + pushad cmp [0x3000],dword 1 je disable_m @@ -345,39 +348,52 @@ __sys_disable_mouse: disable_m: cmp dword [0xf204],dword 0 jne @f + cli call draw_mouse_under + sti ; @@: mov [0xf204],dword 1 ; inc dword [0xf204] @@: no_mouse_disable: + popad - sti +; sti ret __sys_draw_pointer: - cli - pushad - m_pause_1: + cmp [mouse_pause],0 je @f -; call change_task -; jmp m_pause_1 - jmp nodmp + ret @@: + push eax + mov eax,[timer_ticks] + sub eax,[MouseTickCounter] + cmp eax,1 + ja @f + pop eax + ret + @@: + mov eax,[timer_ticks] + mov [MouseTickCounter],eax + pop eax ; cli + + pushad cmp dword [0xf204],dword 0 ; mouse visible ? je chms00 mov [0xf204], dword 0 movzx ebx,word [0xfb0c] movzx eax,word [0xfb0a] + cli call save_draw_mouse - + sti nodmu2: popad - sti + ret chms00: @@ -397,12 +413,11 @@ __sys_draw_pointer: jmp nodmp redrawmouse: - + cli call draw_mouse_under call save_draw_mouse - - nodmp: - - popad sti + nodmp: + popad +; sti ret diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 9d6e0b94fa..21cc7582fc 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -2795,27 +2795,36 @@ sys_drawwindow: cmp edi,0 ; type I - original style jne nosyswI inc [mouse_pause] + call [disable_mouse] call sys_set_window + call [disable_mouse] call drawwindow_I dec [mouse_pause] + call [draw_pointer] ret nosyswI: cmp edi,1 ; type II - only reserve area, no draw jne nosyswII inc [mouse_pause] + call [disable_mouse] call sys_set_window + call [disable_mouse] call sys_window_mouse dec [mouse_pause] + call [draw_pointer] ret nosyswII: cmp edi,2 ; type III - new style jne nosyswIII inc [mouse_pause] + call [disable_mouse] call sys_set_window + call [disable_mouse] call drawwindow_III dec [mouse_pause] + call [draw_pointer] ret nosyswIII: @@ -2834,9 +2843,12 @@ sys_drawwindow: sti inc [mouse_pause] + call [disable_mouse] call sys_set_window - call drawwindow_IV + call [disable_mouse] + call drawwindow_IV dec [mouse_pause] + call [draw_pointer] ret nosyswIV: @@ -3781,10 +3793,12 @@ drawbackground: jne bgrstr12 call vga_drawbackground_tiled dec [mouse_pause] + call [draw_pointer] ret bgrstr12: call vga_drawbackground_stretch dec [mouse_pause] + call [draw_pointer] ret dbrv12: @@ -3794,24 +3808,30 @@ drawbackground: je dbrv20 call vesa12_drawbackground dec [mouse_pause] + call [draw_pointer] ret dbrv20: cmp [display_data-12],dword 1 jne bgrstr call vesa20_drawbackground_tiled dec [mouse_pause] + call [draw_pointer] ret bgrstr: call vesa20_drawbackground_stretch dec [mouse_pause] + call [draw_pointer] ret sys_putimage: +; inc [mouse_pause] cmp [0xfe0c],word 0x12 jne spiv20 call vga_putimage +; dec [mouse_pause] + call [draw_pointer] ret spiv20: cmp [0xfe0c],word 0100000000000000b @@ -3819,9 +3839,13 @@ sys_putimage: cmp [0xfe0c],word 0x13 je piv20 call vesa12_putimage +; dec [mouse_pause] + call [draw_pointer] ret piv20: call vesa20_putimage +; dec [mouse_pause] + call [draw_pointer] ret @@ -3838,6 +3862,7 @@ __sys_drawbar: jne sdbv20 call vga_drawbar dec [mouse_pause] + call [draw_pointer] ret sdbv20: cmp [0xfe0c],word 0100000000000000b @@ -3846,10 +3871,12 @@ __sys_drawbar: je dbv20 call vesa12_drawbar dec [mouse_pause] + call [draw_pointer] ret dbv20: call vesa20_drawbar dec [mouse_pause] + call [draw_pointer] ret @@ -4886,6 +4913,7 @@ active_process dd 0 active_process_flag db 0 deleted_process dd 0 mouse_pause dd 0 +MouseTickCounter dd 0 ps2_mouse_detected db 0 com1_mouse_detected db 0 com2_mouse_detected db 0 diff --git a/kernel/trunk/video/vesa20.inc b/kernel/trunk/video/vesa20.inc index e35a73f875..b81ac0be2b 100644 --- a/kernel/trunk/video/vesa20.inc +++ b/kernel/trunk/video/vesa20.inc @@ -377,7 +377,7 @@ ret align 4 __sys_draw_line: - inc [mouse_pause] +; inc [mouse_pause] call [disable_mouse] ; draw a line @@ -513,7 +513,8 @@ align 4 .exit: add esp, 6*4 popa - dec [mouse_pause] +; dec [mouse_pause] + call [draw_pointer] ret