diff --git a/24_day/bootpack.c b/24_day/bootpack.c index 541aa30..668bae3 100644 --- a/24_day/bootpack.c +++ b/24_day/bootpack.c @@ -285,6 +285,18 @@ void HariMain(void) mmx = mx; /*进入窗口移动模式*/ mmy = my; } + if (sht->bxsize - 21 <= x && x < sht->bxsize - 5 && 5 <=y && y < 19) { + /*点击“×”按钮*/ + if (sht->task != 0) { /*该窗口是否为应用程序窗口?*/ + cons = (struct CONSOLE *) *((int *) 0x0fec); + cons_putstr0(cons, "\nBreak(mouse) :\n"); + io_cli(); /*强制结束处理中禁止切换任务*/ + task_cons->tss.eax = (int) + &(task_cons->tss.esp0); + task_cons->tss.eip = (int) asm_end_app; + io_sti(); + } + } break; } }