summaryrefslogtreecommitdiff
path: root/src/lib/ecore_win32
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2015-08-25 19:32:29 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-08-25 19:35:45 +0900
commit97b214b0339fbc18398811105ac9619afa5b89fb (patch)
tree69bf748058e4575ea463c31b7dc29761b9477800 /src/lib/ecore_win32
parent3ce8860dab29ba6d0849ed1ecbbc72bbe0e11773 (diff)
Revert "Revert "ecore_win: fix the incorrect mouse cursor position.""
This reverts commit 3ce8860dab29ba6d0849ed1ecbbc72bbe0e11773. Apply only to mouse wheel case. Button press/release wans't problem actually. If I correct, this is caused because of different nature of window systems. Anyway our Ecore_Event_Mouse values should keep consistency among the various systems.
Diffstat (limited to 'src/lib/ecore_win32')
-rw-r--r--src/lib/ecore_win32/ecore_win32_event.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/ecore_win32/ecore_win32_event.c b/src/lib/ecore_win32/ecore_win32_event.c
index f9d29a1a6f..99ad2d49bf 100644
--- a/src/lib/ecore_win32/ecore_win32_event.c
+++ b/src/lib/ecore_win32/ecore_win32_event.c
@@ -1421,10 +1421,13 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
1421 int button) 1421 int button)
1422{ 1422{
1423 Ecore_Win32_Window *window; 1423 Ecore_Win32_Window *window;
1424 RECT rect = { 0, 0, 0, 0 };
1424 1425
1425 INF("mouse button pressed"); 1426 INF("mouse button pressed");
1426 1427
1427 window = (Ecore_Win32_Window *)GetWindowLongPtr(msg->window, GWLP_USERDATA); 1428 window = (Ecore_Win32_Window *)GetWindowLongPtr(msg->window, GWLP_USERDATA);
1429 if (!GetWindowRect(window->window, &rect))
1430 ERR("GetWindowRect() failed!");
1428 1431
1429 if (button > 3) 1432 if (button > 3)
1430 { 1433 {
@@ -1438,8 +1441,10 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
1438 e->direction = 0; 1441 e->direction = 0;
1439 /* wheel delta is positive or negative, never 0 */ 1442 /* wheel delta is positive or negative, never 0 */
1440 e->z = GET_WHEEL_DELTA_WPARAM(msg->window_param) > 0 ? -1 : 1; 1443 e->z = GET_WHEEL_DELTA_WPARAM(msg->window_param) > 0 ? -1 : 1;
1441 e->x = GET_X_LPARAM(msg->data_param); 1444 e->x = GET_X_LPARAM(msg->data_param) - rect.left;
1442 e->y = GET_Y_LPARAM(msg->data_param); 1445 e->y = GET_Y_LPARAM(msg->data_param) - rect.top;
1446 e->root.x = rect.left;
1447 e->root.y = rect.top;
1443 e->timestamp = msg->timestamp; 1448 e->timestamp = msg->timestamp;
1444 e->modifiers = _ecore_win32_modifiers_get(); 1449 e->modifiers = _ecore_win32_modifiers_get();
1445 1450
@@ -1460,6 +1465,8 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
1460 e->event_window = e->window; 1465 e->event_window = e->window;
1461 e->x = GET_X_LPARAM(msg->data_param); 1466 e->x = GET_X_LPARAM(msg->data_param);
1462 e->y = GET_Y_LPARAM(msg->data_param); 1467 e->y = GET_Y_LPARAM(msg->data_param);
1468 e->root.x = rect.left;
1469 e->root.y = rect.top;
1463 e->timestamp = msg->timestamp; 1470 e->timestamp = msg->timestamp;
1464 e->modifiers = _ecore_win32_modifiers_get(); 1471 e->modifiers = _ecore_win32_modifiers_get();
1465 1472
@@ -1488,6 +1495,8 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
1488 e->buttons = button; 1495 e->buttons = button;
1489 e->x = GET_X_LPARAM(msg->data_param); 1496 e->x = GET_X_LPARAM(msg->data_param);
1490 e->y = GET_Y_LPARAM(msg->data_param); 1497 e->y = GET_Y_LPARAM(msg->data_param);
1498 e->root.x = rect.left;
1499 e->root.y = rect.top;
1491 e->timestamp = msg->timestamp; 1500 e->timestamp = msg->timestamp;
1492 e->modifiers = _ecore_win32_modifiers_get(); 1501 e->modifiers = _ecore_win32_modifiers_get();
1493 1502