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 T6415
This commit is contained in:
Carsten Haitzler 2018-11-20 19:08:25 +00:00
parent 5ba54b7aa8
commit 6321664f08
3 changed files with 19 additions and 1 deletions

View File

@ -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)
{

View File

@ -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);

View File

@ -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;
}