- API (Windows): call mouse-handling functions with

coords relative to window, not screen


svn path=/trunk/boinc/; revision=15764
This commit is contained in:
David Anderson 2008-08-06 20:44:26 +00:00
parent 9b671b8f10
commit cd4cf976ea
2 changed files with 14 additions and 7 deletions

View File

@ -231,23 +231,22 @@ LRESULT CALLBACK WndProc(
} else {
int which;
bool down;
POINT cPos;
GetCursorPos(&cPos);
parse_mouse_event(uMsg, which, down);
boinc_app_mouse_button(cPos.x, cPos.y, which, down);
boinc_app_mouse_button(
(int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam),
which, down
);
}
return 0;
case WM_MOUSEMOVE:
if(!window_ready) return 0;
POINT cPos;
GetCursorPos(&cPos);
if (fullscreen) {
if(cPos.x != mousePos.x || cPos.y != mousePos.y) {
if((int)(short)LOWORD(lParam) != mousePos.x || (int)(short)HIWORD(lParam) != mousePos.y) {
boinc_close_window_and_quit("mouse move");
}
} else {
boinc_app_mouse_move(
cPos.x, cPos.y,
(int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam),
(wParam&MK_LBUTTON)!=0,
(wParam&MK_MBUTTON)!=0,
(wParam&MK_RBUTTON)!=0

View File

@ -6214,3 +6214,11 @@ David 6 Aug 2008
sched/
file_deleter.C
David 6 Aug 2008
- API (Windows): call mouse-handling functions with
coords relative to window, not screen
api/
graphics2_win.C