From 0ecfb6aa5b0635e5a861ce913a472bab8458d1f6 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Sun, 10 Feb 2008 20:42:18 +0000 Subject: [PATCH] @menu: bugfix: when child menu was closed on Esc, the same child could not be opened git-svn-id: svn://kolibrios.org@728 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/menu/trunk/menu.asm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/programs/system/menu/trunk/menu.asm b/programs/system/menu/trunk/menu.asm index b94dba02cb..fa2c5cde27 100644 --- a/programs/system/menu/trunk/menu.asm +++ b/programs/system/menu/trunk/menu.asm @@ -361,10 +361,17 @@ thread_stack_not_full: close: - or eax, -1 ; close this thread - mov [edi + child], al ; my child is not mine - mcall - + movzx ebx, [edi+parent] ; parent id + shl ebx, 4 + add ebx, menu_data ; ebx = base of parent info + call backconvert + cmp [ebx + child], al ; if i am the child of my parent... + jnz @f + mov [ebx + child], -1 ; ...my parent now has no children +@@: + or eax, -1 ; close this thread + mov [edi + child], al ; my child is not mine + mcall backconvert: ; convert from pointer to process id mov eax, edi