static void _e_comp_wl_move_resize_init(void);
static E_Client * _e_comp_wl_client_usable_get(pid_t pid, E_Pixmap *ep);
+static Eina_Bool _e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Client *ec);
/* local variables */
typedef struct _E_Comp_Wl_Key_Data
[E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_IN] = NULL,
[E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_OUT] = NULL,
[E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_MOVE] = NULL,
+ [E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_WHEEL] = NULL,
+ [E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_DOWN] = NULL,
+ [E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_UP] = NULL,
};
static Eina_List *hooks = NULL;
_e_comp_wl_cursor_reload(ec);
break;
+ case EVAS_CALLBACK_MOUSE_WHEEL:
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_WHEEL, ec);
+ if (!ret) break;
+
+ if (e_pointer_is_hidden(e_comp->pointer))
+ _e_comp_wl_cursor_reload(ec);
+ break;
+
+ case EVAS_CALLBACK_MOUSE_DOWN:
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_DOWN, ec);
+ if (!ret) break;
+
+ if (e_comp_wl->ptr.hide_tmr)
+ {
+ ecore_timer_del(e_comp_wl->ptr.hide_tmr);
+ e_comp_wl->ptr.hide_tmr = NULL;
+ }
+ cursor_timer_ec = NULL;
+
+ if (e_pointer_is_hidden(e_comp->pointer))
+ _e_comp_wl_cursor_reload(ec);
+ break;
+
+ case EVAS_CALLBACK_MOUSE_UP:
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_UP, ec);
+ if (!ret) break;
+
default:
break;
}
{
if (e_config->use_cursor_timer)
{
- if (e_comp_wl->ptr.hide_tmr)
- {
- ecore_timer_del(e_comp_wl->ptr.hide_tmr);
- e_comp_wl->ptr.hide_tmr = NULL;
- }
- cursor_timer_ec = NULL;
-
- if (e_pointer_is_hidden(e_comp->pointer))
- _e_comp_wl_cursor_reload(ec);
+ if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_DOWN, ec))
+ return;
}
e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button,
}
else
{
+ if (e_config->use_cursor_timer)
+ {
+ 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 (e_config->use_cursor_timer)
{
- if (e_pointer_is_hidden(e_comp->pointer))
- _e_comp_wl_cursor_reload(ec);
+ if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, ec))
+ return;
}
_e_comp_wl_device_send_event_device(ec, ev->dev, ev->timestamp);
if (e_config->use_cursor_timer)
{
- if (e_pointer_is_hidden(e_comp->pointer))
- _e_comp_wl_cursor_reload(ec);
+ if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, ec))
+ return EINA_TRUE;
}
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);