disabled mouse tracking should just supress MSG_MOUSE_MOVED - all other mouse messages are supposed to be dispatched.

svn path=/trunk/; revision=11353
This commit is contained in:
Thomas Bluemel 2004-10-20 19:19:12 +00:00
parent ab895b1d38
commit 5df79e4eec
2 changed files with 34 additions and 28 deletions

View file

@ -6,6 +6,7 @@
#define MSG_MOUSE_BUT2_PRESSED 163
#define MSG_MOUSE_BUT1_RELEASED 164
#define MSG_MOUSE_BUT2_RELEASED 165
#define MSG_MOUSE_MOVED 166
#define MSG_GUI_REDRAW 170
#define MSG_COMMAND 2505
#define MSG_QUIT 2600

View file

@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* $Id: libskygi.c,v 1.12 2004/09/26 15:55:53 weiden Exp $
/* $Id: libskygi.c,v 1.13 2004/10/20 19:19:12 weiden Exp $
*
* PROJECT: SkyOS GI library
* FILE: lib/libskygi/libskygi.c
@ -223,39 +223,44 @@ IntIsSkyMessage(PSKY_WINDOW skw, MSG *Msg, s_gi_msg *smsg)
smsg->type = MSG_COMMAND;
smsg->para1 = LOWORD(Msg->wParam);
return TRUE;
}
if(skw->MouseInput)
{
switch(Msg->message)
{
case WM_LBUTTONDOWN:
smsg->type = MSG_MOUSE_BUT1_PRESSED;
goto DoMouseInputMessage;
case WM_LBUTTONUP:
smsg->type = MSG_MOUSE_BUT1_RELEASED;
goto DoMouseInputMessage;
case WM_RBUTTONDOWN:
smsg->type = MSG_MOUSE_BUT2_PRESSED;
goto DoMouseInputMessage;
case WM_RBUTTONUP:
{
POINT pt;
smsg->type = MSG_MOUSE_BUT2_RELEASED;
case WM_MOUSEMOVE:
if(skw->MouseInput)
{
smsg->type = MSG_MOUSE_MOVED;
goto DoMouseInputMessage;
}
break;
case WM_LBUTTONDOWN:
smsg->type = MSG_MOUSE_BUT1_PRESSED;
goto DoMouseInputMessage;
case WM_LBUTTONUP:
smsg->type = MSG_MOUSE_BUT1_RELEASED;
goto DoMouseInputMessage;
case WM_RBUTTONDOWN:
smsg->type = MSG_MOUSE_BUT2_PRESSED;
goto DoMouseInputMessage;
case WM_RBUTTONUP:
{
POINT pt;
smsg->type = MSG_MOUSE_BUT2_RELEASED;
DoMouseInputMessage:
#if 0
pt.x = LOWORD(Msg->lParam);
pt.y = HIWORD(Msg->lParam);
pt.x = LOWORD(Msg->lParam);
pt.y = HIWORD(Msg->lParam);
#else
pt = Msg->pt;
MapWindowPoints(NULL, skw->hWnd, &pt, 1);
pt = Msg->pt;
MapWindowPoints(NULL, skw->hWnd, &pt, 1);
#endif
smsg->para1 = pt.x;
smsg->para2 = pt.y;
return TRUE;
}
smsg->para1 = pt.x;
smsg->para2 = pt.y;
return TRUE;
}
}