aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-20 19:08:25 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-20 19:08:25 +0000
commit6321664f08726843d8170c75a7549070e944b805 (patch)
treebf774514aa92fce496e4defcccf547c140e2dd43
parente winlist focus and input - fix to work with basic wheel/mouse ev (diff)
downloadenlightenment-6321664f08726843d8170c75a7549070e944b805.tar.gz
e - winlist/client - don't leave dangling action on window
as winlist doesn't target specific windows ... don't leave the action on the window dangling there. finally fixes https://phab.enlightenment.org/T6415
-rw-r--r--src/bin/e_client.c13
-rw-r--r--src/bin/e_client.h3
-rw-r--r--src/modules/winlist/e_mod_main.c4
3 files changed, 19 insertions, 1 deletions
diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 5d73ca88b..b12d79d6c 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -2134,6 +2134,8 @@ _e_client_eval(E_Client *ec)
/* Set this window into moving state */
ec->cur_mouse_action = e_action_find("window_move");
+ if (ec->next_mouse_action_ignore)
+ ec->cur_mouse_action = NULL;
if (ec->cur_mouse_action)
{
if ((!ec->cur_mouse_action->func.end_mouse) &&
@@ -3030,6 +3032,8 @@ e_client_mouse_down(E_Client *ec, int button, Evas_Point *output, E_Binding_Even
ec->cur_mouse_action =
e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_WINDOW,
E_OBJECT(ec), ev);
+ if (ec->next_mouse_action_ignore)
+ ec->cur_mouse_action = NULL;
if (ec->cur_mouse_action)
{
did_act = EINA_TRUE;
@@ -5609,6 +5613,15 @@ e_client_redirected_set(E_Client *ec, Eina_Bool set)
////////////////////////////////////////////
+E_API void
+e_client_next_mouse_action_ignore(E_Client *ec)
+{
+ EINA_SAFETY_ON_NULL_RETURN(ec);
+ ec->next_mouse_action_ignore = EINA_TRUE;
+}
+
+////////////////////////////////////////////
+
E_API Eina_Bool
e_client_is_stacking(const E_Client *ec)
{
diff --git a/src/bin/e_client.h b/src/bin/e_client.h
index c2f7128b9..ceae23994 100644
--- a/src/bin/e_client.h
+++ b/src/bin/e_client.h
@@ -652,6 +652,8 @@ struct E_Client
unsigned int internal_no_remember E_BITFIELD;
unsigned int internal_no_reopen E_BITFIELD;
+ unsigned int next_mouse_action_ignore E_BITFIELD;
+
Evas_Object *internal_elm_win;
double ping;
@@ -850,6 +852,7 @@ E_API E_Client *e_client_under_pointer_get(E_Desk *desk, E_Client *exclude);
E_API int e_client_pointer_warp_to_center_now(E_Client *ec);
E_API int e_client_pointer_warp_to_center(E_Client *ec);
E_API void e_client_redirected_set(E_Client *ec, Eina_Bool set);
+E_API void e_client_next_mouse_action_ignore(E_Client *ec);
E_API Eina_Bool e_client_is_stacking(const E_Client *ec);
E_API Eina_Bool e_client_has_xwindow(const E_Client *ec);
E_API Eina_Bool e_client_desk_window_profile_available_check(E_Client *ec, const char *profile);
diff --git a/src/modules/winlist/e_mod_main.c b/src/modules/winlist/e_mod_main.c
index d7b6049fd..0ed94eda8 100644
--- a/src/modules/winlist/e_mod_main.c
+++ b/src/modules/winlist/e_mod_main.c
@@ -109,7 +109,7 @@ e_modapi_save(E_Module *m EINA_UNUSED)
/* action callback */
static Eina_Bool
-_e_mod_action_winlist_cb_helper(E_Object *obj EINA_UNUSED, const char *params, int modifiers, E_Winlist_Activate_Type type)
+_e_mod_action_winlist_cb_helper(E_Object *obj, const char *params, int modifiers, E_Winlist_Activate_Type type)
{
E_Zone *zone = NULL;
E_Winlist_Filter filter = E_WINLIST_FILTER_NONE;
@@ -149,6 +149,8 @@ _e_mod_action_winlist_cb_helper(E_Object *obj EINA_UNUSED, const char *params, i
if (direction == 1) e_winlist_next();
else if (direction == -1) e_winlist_prev();
else e_winlist_direction_select(zone, udlr);
+ if ((obj) && (obj->type == E_CLIENT_TYPE))
+ e_client_next_mouse_action_ignore((E_Client *)obj);
return EINA_TRUE;
}