From: caro Date: Tue, 29 Nov 2011 06:58:55 +0000 (+0000) Subject: Ecore_Win32: Fix AltGr detection on Windows XP (discard additional Ctrl left) X-Git-Tag: 2.0_alpha~108^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76ca76b26c86ae4169e47f5545fc4f049e00fc14;p=framework%2Fuifw%2Fecore.git Ecore_Win32: Fix AltGr detection on Windows XP (discard additional Ctrl left) API break (no problem if you don't use timestamps directly from Ecore_Win32) git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@65673 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/ChangeLog b/ChangeLog index 410bffe..213226c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -350,3 +350,7 @@ 2011-11-27 Vincent Torri * Fix and improve key management on Windows XP + +2011-11-29 Vincent Torri + + * Discard left Ctrl when AltGr is pressed (Windows XP) diff --git a/NEWS b/NEWS index 701eae6..55bf577 100644 --- a/NEWS +++ b/NEWS @@ -75,7 +75,7 @@ Fixes: * NULL pointer dereference in ecore_x selection notification code * sync GNUTLS thread activation with eina changes * ecore_ipc compilation on Windows - * fix Shift, Control and Alt keys detection on Windows + * fix Shift, Control, Alt and AltGr keys detection on Windows XP * "mouse-down inside and mouse-up outside" issue on Windows * ecore_x shadow tree search fixed to respect shape input of windows * fd handlers fixed when idler callbacks add jobs or events diff --git a/src/lib/ecore_evas/ecore_evas_win32.c b/src/lib/ecore_evas/ecore_evas_win32.c index 2ca7cb0..cfec528 100644 --- a/src/lib/ecore_evas/ecore_evas_win32.c +++ b/src/lib/ecore_evas/ecore_evas_win32.c @@ -147,9 +147,9 @@ _ecore_evas_win32_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, voi if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); /* FIXME to do */ /* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */ - evas_event_feed_mouse_in(ee->evas, e->time, NULL); + evas_event_feed_mouse_in(ee->evas, e->timestamp, NULL); evas_focus_in(ee->evas); - _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); + _ecore_evas_mouse_move_process(ee, e->x, e->y, e->timestamp); return 1; } @@ -169,9 +169,9 @@ _ecore_evas_win32_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, vo /* FIXME to do */ /* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */ - _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); + _ecore_evas_mouse_move_process(ee, e->x, e->y, e->timestamp); - evas_event_feed_mouse_out(ee->evas, e->time, NULL); + evas_event_feed_mouse_out(ee->evas, e->timestamp, NULL); if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); diff --git a/src/lib/ecore_win32/Ecore_Win32.h b/src/lib/ecore_win32/Ecore_Win32.h index bdfb1c8..95e3749 100644 --- a/src/lib/ecore_win32/Ecore_Win32.h +++ b/src/lib/ecore_win32/Ecore_Win32.h @@ -221,7 +221,7 @@ struct _Ecore_Win32_Event_Mouse_In Ecore_Win32_Window *window; /**< The window that received the event */ int x; /**< The x coordinate where the mouse leaved */ int y; /**< The y coordinate where the mouse entered */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -233,7 +233,7 @@ struct _Ecore_Win32_Event_Mouse_Out Ecore_Win32_Window *window; /**< The window that received the event */ int x; /**< The x coordinate where the mouse leaved */ int y; /**< The y coordinate where the mouse leaved */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -243,7 +243,7 @@ struct _Ecore_Win32_Event_Mouse_Out struct _Ecore_Win32_Event_Window_Focus_In { Ecore_Win32_Window *window; /**< The window that received the event */ - long long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -253,7 +253,7 @@ struct _Ecore_Win32_Event_Window_Focus_In struct _Ecore_Win32_Event_Window_Focus_Out { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -267,7 +267,7 @@ struct _Ecore_Win32_Event_Window_Damage int y; /**< The y coordinate of the top left corner of the damaged region */ int width; /**< The width of the damaged region */ int height; /**< The time the event occurred */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -277,7 +277,7 @@ struct _Ecore_Win32_Event_Window_Damage struct _Ecore_Win32_Event_Window_Create { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -287,7 +287,7 @@ struct _Ecore_Win32_Event_Window_Create struct _Ecore_Win32_Event_Window_Destroy { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -297,7 +297,7 @@ struct _Ecore_Win32_Event_Window_Destroy struct _Ecore_Win32_Event_Window_Hide { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -307,7 +307,7 @@ struct _Ecore_Win32_Event_Window_Hide struct _Ecore_Win32_Event_Window_Show { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -322,7 +322,7 @@ struct _Ecore_Win32_Event_Window_Configure int y; /**< The new y coordinate of the top left corner */ int width; /**< The new width */ int height; /**< The new height */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -334,7 +334,7 @@ struct _Ecore_Win32_Event_Window_Resize Ecore_Win32_Window *window; /**< The window that received the event */ int width; /**< The new width */ int height; /**< The new height */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -344,7 +344,7 @@ struct _Ecore_Win32_Event_Window_Resize struct _Ecore_Win32_Event_Window_Delete_Request { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -369,12 +369,12 @@ EAPI extern int ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST; /**< Ecore_Event for th /* Core */ -EAPI int ecore_win32_init(); -EAPI int ecore_win32_shutdown(); -EAPI int ecore_win32_screen_depth_get(); -EAPI void ecore_win32_double_click_time_set(double t); -EAPI double ecore_win32_double_click_time_get(void); -EAPI long ecore_win32_current_time_get(void); +EAPI int ecore_win32_init(); +EAPI int ecore_win32_shutdown(); +EAPI int ecore_win32_screen_depth_get(); +EAPI void ecore_win32_double_click_time_set(double t); +EAPI double ecore_win32_double_click_time_get(void); +EAPI unsigned long ecore_win32_current_time_get(void); /* Window */ diff --git a/src/lib/ecore_win32/ecore_win32.c b/src/lib/ecore_win32/ecore_win32.c index 19ca3ed..ba61493 100644 --- a/src/lib/ecore_win32/ecore_win32.c +++ b/src/lib/ecore_win32/ecore_win32.c @@ -73,18 +73,44 @@ _ecore_win32_window_procedure(HWND window, data->message = message; data->window_param = window_param; data->data_param = data_param; - data->time = GetMessageTime(); + data->timestamp = GetMessageTime(); coord = GetMessagePos(); point = MAKEPOINTS(coord); data->x = point.x; data->y = point.y; + data->discard_ctrl = EINA_FALSE; switch (data->message) { /* Keyboard input notifications */ case WM_KEYDOWN: case WM_SYSKEYDOWN: - INF("keydown message"); + if ((data->message == WM_KEYDOWN) && + (data->window_param == VK_CONTROL) && + ((HIWORD(data->data_param) & KF_EXTENDED) == 0)) + { + /* Ctrl left key is pressed */ + BOOL res; + MSG next_msg; + + /* + * we check if the next message + * - is a WM_KEYDOWN + * - has the same timestamp than the Ctrl one + * - is the key press of the right Alt key + */ + res = PeekMessage(&next_msg, data->window, + WM_KEYDOWN, WM_KEYDOWN, + PM_NOREMOVE); + if (res && + (next_msg.wParam == VK_MENU) && + (next_msg.time == data->timestamp) && + (HIWORD(next_msg.lParam) & KF_EXTENDED)) + { + INF("discard left Ctrl key press (sent by AltGr key press)"); + data->discard_ctrl = EINA_TRUE; + } + } _ecore_win32_event_handle_key_press(data, 1); return 0; case WM_CHAR: @@ -95,6 +121,33 @@ _ecore_win32_window_procedure(HWND window, case WM_KEYUP: case WM_SYSKEYUP: INF("keyup message"); + if ((data->window_param == VK_CONTROL) && + ((HIWORD(data->data_param) & KF_EXTENDED) == 0)) + { + /* Ctrl left key is pressed */ + BOOL res; + MSG next_msg; + + /* + * we check if the next message + * - is a WM_KEYUP or WM_SYSKEYUP + * - has the same timestamp than the Ctrl one + * - is the key press of the right Alt key + */ + res = PeekMessage(&next_msg, data->window, + WM_KEYUP, WM_SYSKEYUP, + PM_NOREMOVE); + if (res && + ((next_msg.message == WM_KEYUP) || + (next_msg.message == WM_SYSKEYUP)) && + (next_msg.wParam == VK_MENU) && + (next_msg.time == data->timestamp) && + (HIWORD(next_msg.lParam) & KF_EXTENDED)) + { + INF("discard left Ctrl key release (sent by AltGr key release)"); + data->discard_ctrl = EINA_TRUE; + } + } _ecore_win32_event_handle_key_release(data); return 0; case WM_SETFOCUS: @@ -492,7 +545,7 @@ _ecore_win32_window_procedure(HWND window, HINSTANCE _ecore_win32_instance = NULL; double _ecore_win32_double_click_time = 0.25; -long _ecore_win32_event_last_time = 0; +unsigned long _ecore_win32_event_last_time = 0; Ecore_Win32_Window *_ecore_win32_event_last_window = NULL; int _ecore_win32_log_dom_global = -1; @@ -777,7 +830,7 @@ ecore_win32_double_click_time_get(void) * * This function returns the last event time. */ -EAPI long +EAPI unsigned long ecore_win32_current_time_get(void) { return _ecore_win32_event_last_time; diff --git a/src/lib/ecore_win32/ecore_win32_event.c b/src/lib/ecore_win32/ecore_win32_event.c index 63356d3..f69ee9f 100644 --- a/src/lib/ecore_win32/ecore_win32_event.c +++ b/src/lib/ecore_win32/ecore_win32_event.c @@ -45,8 +45,7 @@ static void _ecore_win32_event_free_key_down(void *data, static void _ecore_win32_event_free_key_up(void *data, void *ev); -static int _ecore_win32_event_keystroke_get(int key, - int is_extended, +static int _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg, Eina_Bool is_down, char **keyname, char **keysymbol, @@ -74,8 +73,7 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, if (is_keystroke) { - if (!_ecore_win32_event_keystroke_get(msg->window_param, - msg->data_param & 0x01000000, + if (!_ecore_win32_event_keystroke_get(msg, EINA_TRUE, (char **)&e->keyname, (char **)&e->key, @@ -105,7 +103,7 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, return; } e->event_window = e->window; - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; @@ -122,15 +120,15 @@ _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg) e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key)); if (!e) return; - if (!_ecore_win32_event_keystroke_get(LOWORD(msg->window_param), - msg->data_param & 0x01000000, + if (!_ecore_win32_event_keystroke_get(msg, EINA_FALSE, (char **)&e->keyname, (char **)&e->key, (char **)&e->string, &e->modifiers)) { - if (!_ecore_win32_event_char_get(LOWORD(msg->window_param), + if (msg->discard_ctrl || + !_ecore_win32_event_char_get(LOWORD(msg->window_param), (char **)&e->keyname, (char **)&e->key, (char **)&e->string)) @@ -147,7 +145,7 @@ _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg) return; } e->event_window = e->window; - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; @@ -178,7 +176,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, e->z = GET_WHEEL_DELTA_WPARAM(msg->window_param) > 0 ? -1 : 1; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -197,7 +195,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, e->event_window = e->window; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -224,7 +222,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, e->buttons = button; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; if (((e->timestamp - _ecore_win32_mouse_down_last_time) <= (unsigned long)(1000 * _ecore_win32_double_click_time)) && (e->window == (Ecore_Window)_ecore_win32_mouse_down_last_window)) @@ -279,7 +277,7 @@ _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg, e->event_window = e->window; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -298,7 +296,7 @@ _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg, e->buttons = button; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_mouse_up_count++; @@ -334,7 +332,7 @@ _ecore_win32_event_handle_motion_notify(Ecore_Win32_Callback_Data *msg) e->event_window = e->window; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL); } @@ -354,7 +352,7 @@ _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg) e->event_window = e->window; e->x = msg->x; e->y = msg->y; - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -371,9 +369,9 @@ _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); e->x = msg->x; e->y = msg->y; - e->time = msg->time ; + e->timestamp = msg->timestamp ; - _ecore_win32_event_last_time = e->time; + _ecore_win32_event_last_time = e->timestamp; ecore_event_add(ECORE_WIN32_EVENT_MOUSE_IN, e, NULL, NULL); } @@ -394,7 +392,7 @@ _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg) e->event_window = e->window; e->x = msg->x; e->y = msg->y; - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -411,9 +409,9 @@ _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); e->x = msg->x; e->y = msg->y; - e->time = msg->time; + e->timestamp = msg->timestamp; - _ecore_win32_event_last_time = e->time; + _ecore_win32_event_last_time = e->timestamp; ecore_event_add(ECORE_WIN32_EVENT_MOUSE_OUT, e, NULL, NULL); } @@ -431,8 +429,8 @@ _ecore_win32_event_handle_focus_in(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; - _ecore_win32_event_last_time = e->time; + e->timestamp = _ecore_win32_event_last_time; + _ecore_win32_event_last_time = e->timestamp; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL); } @@ -449,8 +447,8 @@ _ecore_win32_event_handle_focus_out(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; - _ecore_win32_event_last_time = e->time; + e->timestamp = _ecore_win32_event_last_time; + _ecore_win32_event_last_time = e->timestamp; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL); } @@ -472,7 +470,7 @@ _ecore_win32_event_handle_expose(Ecore_Win32_Callback_Data *msg) e->width = msg->update.right - msg->update.left; e->height = msg->update.bottom - msg->update.top; - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_DAMAGE, e, NULL, NULL); } @@ -489,7 +487,7 @@ _ecore_win32_event_handle_create_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_CREATE, e, NULL, NULL); } @@ -506,7 +504,7 @@ _ecore_win32_event_handle_destroy_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; if (e->window == _ecore_win32_event_last_window) _ecore_win32_event_last_window = NULL; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_DESTROY, e, NULL, NULL); @@ -524,7 +522,7 @@ _ecore_win32_event_handle_map_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_SHOW, e, NULL, NULL); } @@ -541,7 +539,7 @@ _ecore_win32_event_handle_unmap_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_HIDE, e, NULL, NULL); } @@ -572,7 +570,7 @@ _ecore_win32_event_handle_configure_notify(Ecore_Win32_Callback_Data *msg) e->y = wi.rcClient.top; e->width = wi.rcClient.right - wi.rcClient.left; e->height = wi.rcClient.bottom - wi.rcClient.top; - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_CONFIGURE, e, NULL, NULL); } @@ -594,7 +592,7 @@ _ecore_win32_event_handle_resize(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); e->width = rect.right - rect.left; e->height = rect.bottom - rect.top; - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_RESIZE, e, NULL, NULL); } @@ -610,7 +608,7 @@ _ecore_win32_event_handle_delete_request(Ecore_Win32_Callback_Data *msg) if (!e) return; e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST, e, NULL, NULL); } @@ -645,8 +643,7 @@ _ecore_win32_event_free_key_up(void *data __UNUSED__, } static int -_ecore_win32_event_keystroke_get(int key, - int is_extended, +_ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg, Eina_Bool is_down, char **keyname, char **keysymbol, @@ -656,13 +653,16 @@ _ecore_win32_event_keystroke_get(int key, char *kn = NULL; char *ks = NULL; char *kc = NULL; + int key; + int is_extended; + + key = msg->window_param; + is_extended = msg->data_param & 0x01000000; *keyname = NULL; *keysymbol = NULL; *keycompose = NULL; - - printf("vk key 0x%x\n", key); switch (key) { /* Keystroke */ @@ -751,7 +751,6 @@ _ecore_win32_event_keystroke_get(int key, } break; case VK_RIGHT: - printf("vk val 0x%x (right)\n", VK_RIGHT); if (is_extended) { kn = "Right"; @@ -860,6 +859,9 @@ _ecore_win32_event_keystroke_get(int key, { SHORT res; + if (msg->discard_ctrl) + return 0; + if (is_down) { res = GetKeyState(VK_LCONTROL); @@ -1117,7 +1119,6 @@ _ecore_win32_event_keystroke_get(int key, return 0; } - printf("sortie...\n"); *keyname = strdup(kn); if (!*keyname) return 0; *keysymbol = strdup(ks); @@ -1141,7 +1142,6 @@ _ecore_win32_event_keystroke_get(int key, return 0; } } - printf("sortie 2 ...\n"); return 1; } @@ -1161,8 +1161,6 @@ _ecore_win32_event_char_get(int key, *keysymbol = NULL; *keycompose = NULL; - printf("char key 0x%x\n", key); - switch (key) { case VK_PROCESSKEY: @@ -1200,7 +1198,6 @@ _ecore_win32_event_char_get(int key, break; default: /* displayable characters */ - printf (" * key : %d\n", key); buf[0] = key; buf[1] = '\0'; kn = buf; diff --git a/src/lib/ecore_win32/ecore_win32_private.h b/src/lib/ecore_win32/ecore_win32_private.h index 4533169..ab54763 100644 --- a/src/lib/ecore_win32/ecore_win32_private.h +++ b/src/lib/ecore_win32/ecore_win32_private.h @@ -49,14 +49,15 @@ typedef struct _Ecore_Win32_Callback_Data Ecore_Win32_Callback_Data; struct _Ecore_Win32_Callback_Data { - RECT update; - HWND window; - unsigned int message; - WPARAM window_param; - LPARAM data_param; - long time; - int x; - int y; + RECT update; + HWND window; + unsigned int message; + WPARAM window_param; + LPARAM data_param; + unsigned long timestamp; + int x; + int y; + Eina_Bool discard_ctrl; }; struct _Ecore_Win32_Window @@ -130,7 +131,7 @@ struct _Ecore_Win32_Window extern HINSTANCE _ecore_win32_instance; extern double _ecore_win32_double_click_time; -extern long _ecore_win32_event_last_time; +extern unsigned long _ecore_win32_event_last_time; extern Ecore_Win32_Window *_ecore_win32_event_last_window;