From c039e0039c3917276ffbace58f9601913679cc12 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Mon, 12 Mar 2012 11:16:00 +0000 Subject: [PATCH] Fix previous kernel revision for debugging with MTDBG. git-svn-id: svn://kolibrios.org@2452 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index ff01bd3edd..41c0a34ae4 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -1949,6 +1949,7 @@ sys_end: call delay_hs jmp waitterm ;------------------------------------------------------------------------------ +align 4 restore_default_cursor_before_killing: mov eax, [def_cursor] mov [ecx+APPDATA.cursor], eax @@ -1964,9 +1965,14 @@ restore_default_cursor_before_killing: movzx edx, byte [ebx+eax] shl edx, 8 mov esi, [edx+SLOT_BASE+APPDATA.cursor] + + cmp esi, [current_cursor] + je @f + push esi call [_display.select_cursor] mov [current_cursor], esi +@@: mov [redrawmouse_unconditional], 1 call [draw_pointer] ret @@ -2041,15 +2047,19 @@ sysfn_terminate: ; 18.2 = TERMINATE jz noprocessterminate ;-------------------------------------- cmp [_display.select_cursor], 0 - je @f + je .restore_end ; restore default cursor before killing pusha mov ecx, [esp+32] shl ecx, 8 add ecx, SLOT_BASE + mov eax, [def_cursor] + cmp [ecx+APPDATA.cursor], eax + je @f call restore_default_cursor_before_killing - popa @@: + popa +.restore_end: add esp, 4 ;-------------------------------------- ;call MEM_Heap_Lock ;guarantee that process isn't working with heap