sysmon: kill process by delete key

@icon: fix old issue with accedental icon click when user moved clicked mouse from active window

git-svn-id: svn://kolibrios.org@7956 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-05-19 21:39:09 +00:00
parent 895aef63b4
commit 7c4990bd81
2 changed files with 20 additions and 7 deletions

View File

@ -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;

View File

@ -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