e_pointer: Reset mouse pointer when we return from blanking or desklock

This should fix the issue of mouse pointer getting stuck in
move/resize mode if mouse over move/resize area when desklock or
blanking kicks in
devs/bu5hm4n/swipe_real
Christopher Michael 2 years ago
parent 6444fa73eb
commit 1eddc93943
  1. 2
      src/bin/e_desklock.c
  2. 17
      src/bin/e_pointer.c
  3. 2
      src/bin/e_pointer.h
  4. 4
      src/bin/e_screensaver.c

@ -407,6 +407,8 @@ _desklock_hide_internal(void)
}
if (getenv("E_START_MANAGER")) kill(getppid(), SIGHUP);
e_pointer_reset(e_comp->pointer);
}
E_API int

@ -682,7 +682,7 @@ e_pointer_type_pop(E_Pointer *ptr, void *obj, const char *type)
_e_pointer_type_set(ptr, stack->type);
eina_stringshare_replace(&ptr->type, stack->type);
/* eina_stringshare_replace(&ptr->type, stack->type); */
}
E_API void
@ -887,6 +887,21 @@ e_pointer_grab_set(E_Pointer *ptr, Eina_Bool grab)
}
}
E_API void
e_pointer_reset(E_Pointer *ptr)
{
EINA_SAFETY_ON_NULL_RETURN(ptr);
/* free stack of pointer types */
E_FREE_LIST(ptr->stack, _e_pointer_stack_free);
eina_stringshare_del(ptr->type);
eina_stringshare_del(ptr->deferred_type);
/* reset pointer to default */
e_pointer_type_push(ptr, ptr, "default");
}
EINTERN void
e_pointers_freeze_set(Eina_Bool set)
{

@ -84,5 +84,7 @@ E_API void e_pointer_idler_before(void);
E_API void e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y);
E_API void e_pointer_window_add(E_Pointer *ptr, Ecore_Window win);
E_API void e_pointer_grab_set(E_Pointer *ptr, Eina_Bool grab);
E_API void e_pointer_reset(E_Pointer *ptr);
# endif
#endif

@ -227,6 +227,10 @@ _e_screensaver_handler_screensaver_off_cb(void *data EINA_UNUSED, int type EINA_
ecore_timer_del(_e_screensaver_suspend_timer);
_e_screensaver_suspend_timer = NULL;
}
if (!e_desklock_state_get())
e_pointer_reset(e_comp->pointer);
return ECORE_CALLBACK_PASS_ON;
}

Loading…
Cancel
Save