From 7fafcb264e5f9083a3d715400588aeebef6fa1ac Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sat, 16 Jun 2012 18:35:16 +0000 Subject: [PATCH] HTMLv 0.93b: bug with 100% cpu loading in RmB menu fixed (thanks 0CodErr) git-svn-id: svn://kolibrios.org@2799 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/htmlv/browser/TWB.h | 2 +- programs/network/htmlv/browser/include/menu_rmb.h | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/programs/network/htmlv/browser/TWB.h b/programs/network/htmlv/browser/TWB.h index 5da3107974..044ebedb36 100644 --- a/programs/network/htmlv/browser/TWB.h +++ b/programs/network/htmlv/browser/TWB.h @@ -9,7 +9,7 @@ dword j, char download_path[]="/rd/1/.download"; char search_path[]="http://nigma.ru/index.php?s="; -char version[]=" Text-based Browser 0.93"; +char version[]=" Text-based Browser 0.93b"; char tinypad_path[]="/sys/tinypad"; char t_edit_path[]="/sys/develop/t_edit"; diff --git a/programs/network/htmlv/browser/include/menu_rmb.h b/programs/network/htmlv/browser/include/menu_rmb.h index 4c6237becf..0ce0bb5ca5 100644 --- a/programs/network/htmlv/browser/include/menu_rmb.h +++ b/programs/network/htmlv/browser/include/menu_rmb.h @@ -23,10 +23,13 @@ void menu_rmb() SetEventMask(100111b); - loop() switch(CheckEvent()) + loop() switch(WaitEvent()) { case evMouse: mm.get(); + if (mm.lkm) || (mm.pkm) + if (mm.x>ITEM_WIDTH) || (mm.y>items_num*ITEM_HEIGHT+1) ExitProcess(); + id=mm.y/ITEM_HEIGHT; if (id<0) || (id+1>items_num) break; if (items_cur<>id) @@ -84,9 +87,5 @@ void menu_rmb() DrawBar(1, i*ITEM_HEIGHT+1, ITEM_WIDTH-1, ITEM_HEIGHT, EDX); WriteText(8,i*ITEM_HEIGHT+6,0x80,0x000000,ITEMS_LIST[i],0); } - default: - GetProcessInfo(#MenuForm, SelfInfo); - id=GetSlot(MenuForm.ID); - if (id<>ActiveProcess()) ExitProcess(); } } \ No newline at end of file