raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b9df223fa2fb0c0293b3b28363030965e5acb9ff
commit b9df223fa2fb0c0293b3b28363030965e5acb9ff Author: Vincent Torri <vincent.to...@gmail.com> Date: Tue Oct 13 15:19:26 2020 +0100 Ecore_Evas win32: fix activate() function Summary: activating the function needs un-iconified first Test Plan: elm windows status tests Reviewers: raster, jptiz, felipealmeida Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12176 --- src/lib/ecore_win32/Ecore_Win32.h | 2 ++ src/lib/ecore_win32/ecore_win32_window.c | 23 ++++++++++++++++++++++ .../ecore_evas/engines/win32/ecore_evas_win32.c | 6 ++++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_win32/Ecore_Win32.h b/src/lib/ecore_win32/Ecore_Win32.h index b83f8dae54..fa5b80eb48 100644 --- a/src/lib/ecore_win32/Ecore_Win32.h +++ b/src/lib/ecore_win32/Ecore_Win32.h @@ -611,6 +611,8 @@ EAPI void ecore_win32_window_raise(Ecore_Win32_Window *window); EAPI void ecore_win32_window_lower(Ecore_Win32_Window *window); +EAPI void ecore_win32_window_activate(Ecore_Win32_Window *window); + EAPI void ecore_win32_window_title_set(Ecore_Win32_Window *window, const char *title); diff --git a/src/lib/ecore_win32/ecore_win32_window.c b/src/lib/ecore_win32/ecore_win32_window.c index 628264d7b3..2199d4a6df 100644 --- a/src/lib/ecore_win32/ecore_win32_window.c +++ b/src/lib/ecore_win32/ecore_win32_window.c @@ -1154,6 +1154,29 @@ ecore_win32_window_lower(Ecore_Win32_Window *window) } } +/** + * @brief Activate the given window. + * + * @param window The window to activate. + * + * This functions activates the windows @p window. If @p window + * is @c NULL, this function does nothing. Otherwise, the window is + * activated. So if is minimized or maximized, the window is restored + * to its original position and size. + * + *@since 1.26 + */ +EAPI void +ecore_win32_window_activate(Ecore_Win32_Window *window) +{ + if (!window) return; + + INF("activate window"); + + ShowWindow(window->window, SW_RESTORE); + window->iconified = EINA_FALSE; +} + /** * @brief Set the title of the given window. * diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c index 4f2f5c3d6e..b159779940 100644 --- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c +++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c @@ -100,6 +100,7 @@ static Eina_Bool _ecore_evas_win32_event_window_delete_request(void *data EINA_U static Eina_Bool _ecore_evas_win32_event_window_property_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event); + /* Private functions */ static int @@ -830,7 +831,8 @@ _ecore_evas_win32_activate(Ecore_Evas *ee) { INF("ecore evas activate"); - ecore_win32_window_focus((Ecore_Win32_Window *)ee->prop.window); + ecore_evas_show(ee); + ecore_win32_window_activate(ee->prop.window); } static void @@ -1371,7 +1373,7 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func = _ecore_evas_win32_iconified_set, _ecore_evas_win32_borderless_set, _ecore_evas_win32_override_set, - NULL, + NULL, /* _ecore_evas_x_maximize_set */ _ecore_evas_win32_fullscreen_set, NULL, /* _ecore_evas_x_avoid_damage_set */ NULL, /* _ecore_evas_x_withdrawn_set */ --