forked from enlightenment/efl
elm+evas - windows - fix alt+f4 to work without losing alt key
fixes T5581
This commit is contained in:
parent
cbea6e4386
commit
c233274529
|
@ -75,14 +75,14 @@ _ecore_win32_window_procedure(HWND window,
|
||||||
{
|
{
|
||||||
/* Keyboard input notifications */
|
/* Keyboard input notifications */
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
/*case WM_SYSKEYDOWN:*/
|
case WM_SYSKEYDOWN:
|
||||||
INF("key down message");
|
INF("key down message");
|
||||||
_ecore_win32_event_handle_key_press(data);
|
_ecore_win32_event_handle_key_press(data);
|
||||||
return 0;
|
return 0;
|
||||||
/* case WM_CHAR: */
|
/* case WM_CHAR: */
|
||||||
/* case WM_SYSCHAR: */
|
/* case WM_SYSCHAR: */
|
||||||
case WM_KEYUP:
|
case WM_KEYUP:
|
||||||
/*case WM_SYSKEYUP:*/
|
case WM_SYSKEYUP:
|
||||||
INF("key up message");
|
INF("key up message");
|
||||||
_ecore_win32_event_handle_key_release(data);
|
_ecore_win32_event_handle_key_release(data);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -97,6 +97,7 @@ struct _Efl_Ui_Win_Data
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Ecore_Win32_Window *win;
|
Ecore_Win32_Window *win;
|
||||||
|
Ecore_Event_Handler *key_down_handler;
|
||||||
} win32;
|
} win32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2803,6 +2804,9 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd)
|
||||||
if (sd->pointer.ee) ecore_evas_free(sd->pointer.ee);
|
if (sd->pointer.ee) ecore_evas_free(sd->pointer.ee);
|
||||||
sd->pointer.surf = NULL;
|
sd->pointer.surf = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_ELEMENTARY_WIN32
|
||||||
|
ecore_event_handler_del(sd->win32.key_down_handler);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (sd->type == ELM_WIN_INLINED_IMAGE)
|
if (sd->type == ELM_WIN_INLINED_IMAGE)
|
||||||
{
|
{
|
||||||
|
@ -3715,6 +3719,23 @@ _elm_win_property_change(void *data,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_ELEMENTARY_WIN32
|
||||||
|
static Eina_Bool
|
||||||
|
_elm_win_key_down(void *data,
|
||||||
|
int type EINA_UNUSED,
|
||||||
|
void *event)
|
||||||
|
{
|
||||||
|
ELM_WIN_DATA_GET(data, sd);
|
||||||
|
Ecore_Event_Key *e = event;
|
||||||
|
if ((e->modifiers & ECORE_EVENT_MODIFIER_ALT) &&
|
||||||
|
(strcmp(e->key, "F4") == 0))
|
||||||
|
_elm_win_delete_request(sd->ee);
|
||||||
|
|
||||||
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_elm_win_focus_highlight_hide(void *data EINA_UNUSED,
|
_elm_win_focus_highlight_hide(void *data EINA_UNUSED,
|
||||||
Evas_Object *obj,
|
Evas_Object *obj,
|
||||||
|
@ -5012,6 +5033,8 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Elm_W
|
||||||
_elm_win_cocoawindow_get(sd);
|
_elm_win_cocoawindow_get(sd);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ELEMENTARY_WIN32
|
#ifdef HAVE_ELEMENTARY_WIN32
|
||||||
|
sd->win32.key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
|
||||||
|
_elm_win_key_down, obj);
|
||||||
_internal_elm_win_win32window_get(sd);
|
_internal_elm_win_win32window_get(sd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue