From 826407144226d82598c8100b5e9da18d3836d407 Mon Sep 17 00:00:00 2001 From: Yourtion Date: Wed, 11 May 2016 13:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E9=BC=A0=E6=A0=87=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 24_day/bootpack.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; } }