diff --git a/programs/cmm/sysmon/process.h b/programs/cmm/sysmon/process.h index c55f0caad7..99a55e9546 100644 --- a/programs/cmm/sysmon/process.h +++ b/programs/cmm/sysmon/process.h @@ -45,6 +45,7 @@ void Processes__Main() break; case evKey: Sysmon__KeyEvent(); + if (key_scancode == SCAN_CODE_DEL) EventKillCurrentProcess(); if (select_list.ProcessKey(key_scancode)) SelectList_LineChanged(); break; case evButton: @@ -54,9 +55,7 @@ void Processes__Main() SelectList_LineChanged(); } if (BTN_ID_KILL_PROCESS == btn) { - KillProcess(current_process_id); - pause(10); - SelectList_LineChanged(); + EventKillCurrentProcess(); } if (BTN_ID_SHOW_PROCESS_INFO == btn) { io.run("/sys/tinfo", itoa(GetProcessSlot(current_process_id))); @@ -88,6 +87,13 @@ void Processes__Main() } } +void EventKillCurrentProcess() +{ + KillProcess(current_process_id); + pause(10); + SelectList_LineChanged(); +} + void Processes__GetProcessList() { int i, j; diff --git a/programs/system/icon_new/icon.asm b/programs/system/icon_new/icon.asm index 33f94063f7..0da9a1684d 100644 --- a/programs/system/icon_new/icon.asm +++ b/programs/system/icon_new/icon.asm @@ -196,10 +196,17 @@ MSGMouse: mov [MouseX],ebx - mcall 37,2 - test al,001b - jnz LButtonPress - test al,010b + mcall 37,3 + test eax,1b ; bit 0 is set = left button is held + jnz @f + jmp CheckRB +@@: + test eax,100000000b ; bit 8 is set = left button is pressed + jnz @f + jmp CheckRB +@@: + jnz LButtonPress +CheckRB: jnz RButtonPress jmp messages