return ret;
}
+static Eina_Bool
+_e_comp_wl_check_cursor_timer_needed(E_Client *ec)
+{
+ if (ec->has_cursor_unset)
+ return EINA_FALSE;
+
+ if (!e_config->show_cursor)
+ return EINA_FALSE;
+
+ if (!e_config->use_cursor_timer)
+ return EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
static void
_e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
return;
}
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
{
if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_IN, ec))
return;
return;
}
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
{
if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_OUT, ec))
return;
}
else
{
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
{
if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_MOVE, ec))
return;
e_pointer_mouse_move(e_comp->pointer, ev->cur.output.x, ev->cur.output.y);
if (!need_send_released) // set cursor's hide_tmr only when mouse button is not pressed
{
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
_e_comp_wl_cursor_move_timer_control(ec);
}
}
}
else
{
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
{
if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_DOWN, ec))
return;
}
else
{
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
{
if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_UP, ec))
return;
e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button,
WL_POINTER_BUTTON_STATE_RELEASED);
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
_e_comp_wl_cursor_move_timer_control(ec);
}
if (!eina_list_count(e_comp_wl->ptr.resources))
return;
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
{
if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, ec))
return;
if (!need_send_released) // set cursor's hide_tmr only when mouse button is not pressed
{
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
_e_comp_wl_cursor_move_timer_control(ec);
}
}
if (!time) time = e_util_timestamp_get();
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
{
if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, ec))
return EINA_TRUE;
if (!need_send_released) // set cursor's hide_tmr only when mouse button is not pressed
{
- if (!ec->has_cursor_unset && e_config->use_cursor_timer)
+ if (_e_comp_wl_check_cursor_timer_needed(ec))
_e_comp_wl_cursor_move_timer_control(ec);
}