From db3c02d4c37d57e8c84b7abe4d5009dc371be45a Mon Sep 17 00:00:00 2001 From: pavelyakov Date: Sun, 2 Aug 2015 23:43:40 +0000 Subject: [PATCH] CMM: mouse: new event drag git-svn-id: svn://kolibrios.org@5657 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 10 +++++----- programs/cmm/lib/kolibri.h | 38 ++++++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 7c9d9d86cd..f1ee459c17 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -189,13 +189,13 @@ void main() if (param) { tmp = strlen(#path); - strncpy(#path, #param, tmp); + strlcpy(#path, #param, tmp); $dec tmp if (path[tmp]!='/') DSBYTE[#path+tmp] = '/'; //add "/" to the end of the string } else { - strncpy(#path, "/rd/1/", 6); + strlcpy(#path, "/rd/1/", 6); } Open_Dir(#path,ONLY_OPEN); SetEventMask(1100111b); @@ -213,7 +213,7 @@ void main() mouse.get(); if (!mouse.mkm) && (stats>0) stats = 0; - if (mouse.mkm) && (stats==0) + if (mouse.mkm) && (!stats) { x_old = mouse.x; y_old = mouse.y; @@ -252,7 +252,7 @@ void main() } } } - if (files.MouseOver(mouse.x, mouse.y))&&((mouse.up)||(mouse.down)||(mouse.dblclick)) + if (files.MouseOver(mouse.x, mouse.y))&&((mouse.down)||(mouse.dblclick)) { //select/open file { if (mouse.key&MOUSE_LEFT)&&((mouse.down)||(mouse.dblclick)) @@ -263,7 +263,7 @@ void main() if (files.current!=id) { mouse.clearTime(); - if (id