forked from enlightenment/efl
ecore_x - restore move event skipper that was removed long ago
so i've been wondering what is going on for a few days... and i've figured it out finally... my mouse seems ot like to generate 1000 events per second. not your usual 100 or 200. it only happened on this one machine so i was wondering what on earth was up. this machine was different in other ways like an arm cpu, differing gpu (rx550), different distro and so on. this is creating a storm of motion events.. and this is causing all sorts of overhead in just trying to deal with them all like generate more internal events, emit signals for every one of them and so on. there is no attempt to play catch-up or anything - just build up a bigger and bigger queue of them to deal with. this is NOT GOOD. this restores our old commented out event skipper that got commented out during some xcb work actually - not on its own. it was a huge xcb patch that commented it out. this restores it and makes it a little cleaner with a bool and now the perf issues i was seeing are gone. this is such a major performance fix that this deserves a backport. @fix @optimize
This commit is contained in:
parent
85491a6847
commit
384ee8d2b6
|
@ -36,8 +36,9 @@ typedef struct _Ecore_X_Mouse_Down_Info
|
||||||
Eina_Bool did_triple : 1;
|
Eina_Bool did_triple : 1;
|
||||||
} Ecore_X_Mouse_Down_Info;
|
} Ecore_X_Mouse_Down_Info;
|
||||||
|
|
||||||
static int _ecore_x_last_event_mouse_move = 0;
|
static Eina_Bool _ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
static Ecore_Event *_ecore_x_last_event_mouse_move_event = NULL;
|
static Ecore_Event *_ecore_x_last_event_mouse_move_event = NULL;
|
||||||
|
static Ecore_Event_Mouse_Move *_ecore_x_last_event_mouse_move_event_e = NULL;
|
||||||
static Eina_Inlist *_ecore_x_mouse_down_info_list = NULL;
|
static Eina_Inlist *_ecore_x_mouse_down_info_list = NULL;
|
||||||
|
|
||||||
#ifdef ECORE_XKB
|
#ifdef ECORE_XKB
|
||||||
|
@ -106,7 +107,8 @@ _ecore_x_event_free_mouse_move(void *data EINA_UNUSED,
|
||||||
if (_ecore_x_last_event_mouse_move)
|
if (_ecore_x_last_event_mouse_move)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move_event = NULL;
|
_ecore_x_last_event_mouse_move_event = NULL;
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move_event_e = NULL;
|
||||||
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(e);
|
free(e);
|
||||||
|
@ -283,6 +285,7 @@ _ecore_mouse_move(unsigned int timestamp,
|
||||||
_ecore_x_event_last_root_y = y_root;
|
_ecore_x_event_last_root_y = y_root;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move_event = event;
|
_ecore_x_last_event_mouse_move_event = event;
|
||||||
|
_ecore_x_last_event_mouse_move_event_e = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -352,7 +355,7 @@ _ecore_key_press(int event,
|
||||||
int val;
|
int val;
|
||||||
int key_len, keyname_len, compose_len;
|
int key_len, keyname_len, compose_len;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
sym = _ecore_x_XKeycodeToKeysym(xevent->display, xevent->keycode, 0);
|
sym = _ecore_x_XKeycodeToKeysym(xevent->display, xevent->keycode, 0);
|
||||||
keyname = XKeysymToString(sym);
|
keyname = XKeysymToString(sym);
|
||||||
|
|
||||||
|
@ -614,7 +617,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
|
||||||
|
|
||||||
INF("ButtonEvent:press time=%u x=%d y=%d button=%d", (unsigned int)xevent->xbutton.time, (int)xevent->xbutton.x, (int)xevent->xbutton.y, xevent->xbutton.button);
|
INF("ButtonEvent:press time=%u x=%d y=%d button=%d", (unsigned int)xevent->xbutton.time, (int)xevent->xbutton.x, (int)xevent->xbutton.y, xevent->xbutton.button);
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
if ((xevent->xbutton.button > 3) && (xevent->xbutton.button < 8))
|
if ((xevent->xbutton.button > 3) && (xevent->xbutton.button < 8))
|
||||||
{
|
{
|
||||||
Ecore_Event_Mouse_Wheel *e;
|
Ecore_Event_Mouse_Wheel *e;
|
||||||
|
@ -763,7 +766,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_button_release(XEvent *xevent)
|
_ecore_x_event_handle_button_release(XEvent *xevent)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
INF("ButtonEvent:release time=%u x=%d y=%d button=%d", (unsigned int)xevent->xbutton.time, (int)xevent->xbutton.x, (int)xevent->xbutton.y, xevent->xbutton.button);
|
INF("ButtonEvent:release time=%u x=%d y=%d button=%d", (unsigned int)xevent->xbutton.time, (int)xevent->xbutton.x, (int)xevent->xbutton.y, xevent->xbutton.button);
|
||||||
/* filter out wheel buttons */
|
/* filter out wheel buttons */
|
||||||
if ((xevent->xbutton.button <= 3) || (xevent->xbutton.button > 7))
|
if ((xevent->xbutton.button <= 3) || (xevent->xbutton.button > 7))
|
||||||
|
@ -803,14 +806,30 @@ _ecore_x_event_handle_button_release(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_motion_notify(XEvent *xevent)
|
_ecore_x_event_handle_motion_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
if (_ecore_x_last_event_mouse_move)
|
if (_ecore_x_last_event_mouse_move)
|
||||||
{
|
{
|
||||||
|
Ecore_Event_Mouse_Move *e = _ecore_x_last_event_mouse_move_event_e;
|
||||||
|
|
||||||
|
if ((e) &&
|
||||||
|
(xevent->xmotion.window == e->event_window) &&
|
||||||
|
(xevent->xmotion.root == e->root_window) &&
|
||||||
|
(xevent->xmotion.same_screen == e->same_screen) &&
|
||||||
|
(_ecore_x_event_modifiers(xevent->xmotion.state) == e->modifiers))
|
||||||
|
{
|
||||||
|
if (((xevent->xmotion.subwindow) &&
|
||||||
|
(xevent->xmotion.subwindow == e->window)) ||
|
||||||
|
((!xevent->xmotion.subwindow) &&
|
||||||
|
(xevent->xmotion.window == e->window)))
|
||||||
|
{
|
||||||
|
// XXX: shouldn't we store event history in the new event
|
||||||
|
// with prior x,y,timestamp (all else assumed the same)
|
||||||
ecore_event_del(_ecore_x_last_event_mouse_move_event);
|
ecore_event_del(_ecore_x_last_event_mouse_move_event);
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
_ecore_x_last_event_mouse_move_event = NULL;
|
_ecore_x_last_event_mouse_move_event = NULL;
|
||||||
}
|
}
|
||||||
*/
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state,
|
_ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state,
|
||||||
xevent->xmotion.x, xevent->xmotion.y,
|
xevent->xmotion.x, xevent->xmotion.y,
|
||||||
xevent->xmotion.x_root, xevent->xmotion.y_root,
|
xevent->xmotion.x_root, xevent->xmotion.y_root,
|
||||||
|
@ -825,7 +844,7 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
|
||||||
xevent->xmotion.x, xevent->xmotion.y,
|
xevent->xmotion.x, xevent->xmotion.y,
|
||||||
xevent->xmotion.x_root, xevent->xmotion.y_root);
|
xevent->xmotion.x_root, xevent->xmotion.y_root);
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 1;
|
_ecore_x_last_event_mouse_move = EINA_TRUE;
|
||||||
|
|
||||||
/* Xdnd handling */
|
/* Xdnd handling */
|
||||||
_ecore_x_dnd_drag(xevent->xmotion.root,
|
_ecore_x_dnd_drag(xevent->xmotion.root,
|
||||||
|
@ -836,7 +855,7 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_enter_notify(XEvent *xevent)
|
_ecore_x_event_handle_enter_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
{
|
{
|
||||||
_ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
|
_ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
|
||||||
xevent->xcrossing.x, xevent->xcrossing.y,
|
xevent->xcrossing.x, xevent->xcrossing.y,
|
||||||
|
@ -900,7 +919,7 @@ _ecore_x_event_handle_enter_notify(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_leave_notify(XEvent *xevent)
|
_ecore_x_event_handle_leave_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
{
|
{
|
||||||
_ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
|
_ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
|
||||||
xevent->xcrossing.x, xevent->xcrossing.y,
|
xevent->xcrossing.x, xevent->xcrossing.y,
|
||||||
|
@ -969,7 +988,7 @@ _ecore_x_event_handle_focus_in(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Focus_In *e;
|
Ecore_X_Event_Window_Focus_In *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
|
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_In));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_In));
|
||||||
if (!e)
|
if (!e)
|
||||||
|
@ -1012,7 +1031,7 @@ _ecore_x_event_handle_focus_out(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Focus_Out *e;
|
Ecore_X_Event_Window_Focus_Out *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
|
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_Out));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_Out));
|
||||||
if (!e)
|
if (!e)
|
||||||
|
@ -1053,7 +1072,7 @@ _ecore_x_event_handle_focus_out(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_keymap_notify(XEvent *xevent EINA_UNUSED)
|
_ecore_x_event_handle_keymap_notify(XEvent *xevent EINA_UNUSED)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
/* FIXME: handle this event type */
|
/* FIXME: handle this event type */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1062,7 +1081,7 @@ _ecore_x_event_handle_expose(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Damage *e;
|
Ecore_X_Event_Window_Damage *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1082,7 +1101,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Damage *e;
|
Ecore_X_Event_Window_Damage *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1100,7 +1119,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_visibility_notify(XEvent *xevent)
|
_ecore_x_event_handle_visibility_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
// if (xevent->xvisibility.state != VisibilityPartiallyObscured)
|
// if (xevent->xvisibility.state != VisibilityPartiallyObscured)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Visibility_Change *e;
|
Ecore_X_Event_Window_Visibility_Change *e;
|
||||||
|
@ -1125,7 +1144,7 @@ _ecore_x_event_handle_create_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Create *e;
|
Ecore_X_Event_Window_Create *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Create));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Create));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1151,7 +1170,7 @@ _ecore_x_event_handle_destroy_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Destroy *e;
|
Ecore_X_Event_Window_Destroy *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Destroy));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Destroy));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1172,7 +1191,7 @@ _ecore_x_event_handle_unmap_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Hide *e;
|
Ecore_X_Event_Window_Hide *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Hide));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Hide));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1189,7 +1208,7 @@ _ecore_x_event_handle_map_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Show *e;
|
Ecore_X_Event_Window_Show *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Show));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Show));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1205,7 +1224,7 @@ _ecore_x_event_handle_map_request(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Show_Request *e;
|
Ecore_X_Event_Window_Show_Request *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Show_Request));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Show_Request));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1221,7 +1240,7 @@ _ecore_x_event_handle_reparent_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Reparent *e;
|
Ecore_X_Event_Window_Reparent *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Reparent));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Reparent));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1238,7 +1257,7 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Configure *e;
|
Ecore_X_Event_Window_Configure *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Configure));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Configure));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1262,7 +1281,7 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Configure_Request *e;
|
Ecore_X_Event_Window_Configure_Request *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Configure_Request));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Configure_Request));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1295,7 +1314,7 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_gravity_notify(XEvent *xevent EINA_UNUSED)
|
_ecore_x_event_handle_gravity_notify(XEvent *xevent EINA_UNUSED)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
/* FIXME: handle this event type */
|
/* FIXME: handle this event type */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1304,7 +1323,7 @@ _ecore_x_event_handle_resize_request(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Resize_Request *e;
|
Ecore_X_Event_Window_Resize_Request *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Resize_Request));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Resize_Request));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1321,7 +1340,7 @@ _ecore_x_event_handle_circulate_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Stack *e;
|
Ecore_X_Event_Window_Stack *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Stack));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Stack));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1342,7 +1361,7 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Stack_Request *e;
|
Ecore_X_Event_Window_Stack_Request *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Stack_Request));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Stack_Request));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1361,7 +1380,7 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_property_notify(XEvent *xevent)
|
_ecore_x_event_handle_property_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Property *e;
|
Ecore_X_Event_Window_Property *e;
|
||||||
|
|
||||||
|
@ -1386,7 +1405,7 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent)
|
||||||
Ecore_X_Atom sel;
|
Ecore_X_Atom sel;
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
d = _ecore_x_selection_get(xevent->xselectionclear.selection);
|
d = _ecore_x_selection_get(xevent->xselectionclear.selection);
|
||||||
if (d && (xevent->xselectionclear.time <= d->time)) return;
|
if (d && (xevent->xselectionclear.time <= d->time)) return;
|
||||||
/* errr..... why? paranoia.
|
/* errr..... why? paranoia.
|
||||||
|
@ -1425,7 +1444,7 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
|
||||||
int typesize;
|
int typesize;
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
/*
|
/*
|
||||||
* Generate a selection request event.
|
* Generate a selection request event.
|
||||||
*/
|
*/
|
||||||
|
@ -1492,7 +1511,7 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
|
||||||
int num_ret, format;
|
int num_ret, format;
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
selection = xevent->xselection.selection;
|
selection = xevent->xselection.selection;
|
||||||
|
|
||||||
if (xevent->xselection.target == ECORE_X_ATOM_SELECTION_TARGETS)
|
if (xevent->xselection.target == ECORE_X_ATOM_SELECTION_TARGETS)
|
||||||
|
@ -1557,7 +1576,7 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Window_Colormap *e;
|
Ecore_X_Event_Window_Colormap *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Colormap));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Colormap));
|
||||||
if (!e)
|
if (!e)
|
||||||
return;
|
return;
|
||||||
|
@ -1576,7 +1595,7 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
|
||||||
void
|
void
|
||||||
_ecore_x_event_handle_client_message(XEvent *xevent)
|
_ecore_x_event_handle_client_message(XEvent *xevent)
|
||||||
{
|
{
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
/* Special client message event handling here. need to put LOTS of if */
|
/* Special client message event handling here. need to put LOTS of if */
|
||||||
/* checks here and generate synthetic events per special message known */
|
/* checks here and generate synthetic events per special message known */
|
||||||
/* otherwise generate generic client message event. this would handle*/
|
/* otherwise generate generic client message event. this would handle*/
|
||||||
|
@ -2050,7 +2069,7 @@ _ecore_x_event_handle_mapping_notify(XEvent *xevent)
|
||||||
static unsigned long last_serial;
|
static unsigned long last_serial;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
|
|
||||||
switch (xevent->xmapping.request)
|
switch (xevent->xmapping.request)
|
||||||
{
|
{
|
||||||
|
@ -2092,7 +2111,7 @@ _ecore_x_event_handle_shape_change(XEvent *xevent)
|
||||||
XShapeEvent *shape_event;
|
XShapeEvent *shape_event;
|
||||||
Ecore_X_Event_Window_Shape *e;
|
Ecore_X_Event_Window_Shape *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
shape_event = (XShapeEvent *)xevent;
|
shape_event = (XShapeEvent *)xevent;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Window_Shape));
|
e = calloc(1, sizeof(Ecore_X_Event_Window_Shape));
|
||||||
if (!e)
|
if (!e)
|
||||||
|
@ -2132,7 +2151,7 @@ _ecore_x_event_handle_screensaver_notify(XEvent *xevent)
|
||||||
XScreenSaverNotifyEvent *screensaver_event;
|
XScreenSaverNotifyEvent *screensaver_event;
|
||||||
Ecore_X_Event_Screensaver_Notify *e;
|
Ecore_X_Event_Screensaver_Notify *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
screensaver_event = (XScreenSaverNotifyEvent *)xevent;
|
screensaver_event = (XScreenSaverNotifyEvent *)xevent;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Screensaver_Notify));
|
e = calloc(1, sizeof(Ecore_X_Event_Screensaver_Notify));
|
||||||
if (!e)
|
if (!e)
|
||||||
|
@ -2158,7 +2177,7 @@ _ecore_x_event_handle_sync_counter(XEvent *xevent)
|
||||||
XSyncCounterNotifyEvent *sync_counter_event;
|
XSyncCounterNotifyEvent *sync_counter_event;
|
||||||
Ecore_X_Event_Sync_Counter *e;
|
Ecore_X_Event_Sync_Counter *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
sync_counter_event = (XSyncCounterNotifyEvent *)xevent;
|
sync_counter_event = (XSyncCounterNotifyEvent *)xevent;
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Sync_Counter));
|
e = calloc(1, sizeof(Ecore_X_Event_Sync_Counter));
|
||||||
if (!e)
|
if (!e)
|
||||||
|
@ -2174,7 +2193,7 @@ _ecore_x_event_handle_sync_alarm(XEvent *xevent)
|
||||||
XSyncAlarmNotifyEvent *sync_alarm_event;
|
XSyncAlarmNotifyEvent *sync_alarm_event;
|
||||||
Ecore_X_Event_Sync_Alarm *e;
|
Ecore_X_Event_Sync_Alarm *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
sync_alarm_event = (XSyncAlarmNotifyEvent *)xevent;
|
sync_alarm_event = (XSyncAlarmNotifyEvent *)xevent;
|
||||||
|
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Sync_Alarm));
|
e = calloc(1, sizeof(Ecore_X_Event_Sync_Alarm));
|
||||||
|
@ -2193,7 +2212,7 @@ _ecore_x_event_handle_randr_change(XEvent *xevent)
|
||||||
XRRScreenChangeNotifyEvent *randr_event;
|
XRRScreenChangeNotifyEvent *randr_event;
|
||||||
Ecore_X_Event_Screen_Change *e;
|
Ecore_X_Event_Screen_Change *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
randr_event = (XRRScreenChangeNotifyEvent *)xevent;
|
randr_event = (XRRScreenChangeNotifyEvent *)xevent;
|
||||||
if (!XRRUpdateConfiguration(xevent))
|
if (!XRRUpdateConfiguration(xevent))
|
||||||
ERR("Can't update RR config!");
|
ERR("Can't update RR config!");
|
||||||
|
@ -2288,7 +2307,7 @@ _ecore_x_event_handle_randr_notify(XEvent *xevent)
|
||||||
{
|
{
|
||||||
const XRRNotifyEvent *randr_event;
|
const XRRNotifyEvent *randr_event;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
randr_event = (const XRRNotifyEvent *)xevent;
|
randr_event = (const XRRNotifyEvent *)xevent;
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
switch (randr_event->subtype)
|
switch (randr_event->subtype)
|
||||||
|
@ -2323,7 +2342,7 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event)
|
||||||
Ecore_X_Event_Fixes_Selection_Notify *e;
|
Ecore_X_Event_Fixes_Selection_Notify *e;
|
||||||
Ecore_X_Atom sel;
|
Ecore_X_Atom sel;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
/* Nothing here yet */
|
/* Nothing here yet */
|
||||||
|
|
||||||
e = calloc(1, sizeof(*e));
|
e = calloc(1, sizeof(*e));
|
||||||
|
@ -2359,7 +2378,7 @@ _ecore_x_event_handle_damage_notify(XEvent *event)
|
||||||
XDamageNotifyEvent *damage_event;
|
XDamageNotifyEvent *damage_event;
|
||||||
Ecore_X_Event_Damage *e;
|
Ecore_X_Event_Damage *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
damage_event = (XDamageNotifyEvent *)event;
|
damage_event = (XDamageNotifyEvent *)event;
|
||||||
|
|
||||||
e = calloc(1, sizeof(Ecore_X_Event_Damage));
|
e = calloc(1, sizeof(Ecore_X_Event_Damage));
|
||||||
|
@ -2454,7 +2473,7 @@ _ecore_x_event_handle_gesture_notify_flick(XEvent *xevent)
|
||||||
XGestureNotifyFlickEvent *xfe;
|
XGestureNotifyFlickEvent *xfe;
|
||||||
Ecore_X_Event_Gesture_Notify_Flick *e;
|
Ecore_X_Event_Gesture_Notify_Flick *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
xfe = (XGestureNotifyFlickEvent *)xevent;
|
xfe = (XGestureNotifyFlickEvent *)xevent;
|
||||||
|
@ -2480,7 +2499,7 @@ _ecore_x_event_handle_gesture_notify_pan(XEvent *xevent)
|
||||||
XGestureNotifyPanEvent *xpe;
|
XGestureNotifyPanEvent *xpe;
|
||||||
Ecore_X_Event_Gesture_Notify_Pan *e;
|
Ecore_X_Event_Gesture_Notify_Pan *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
xpe = (XGestureNotifyPanEvent *)xevent;
|
xpe = (XGestureNotifyPanEvent *)xevent;
|
||||||
|
@ -2507,7 +2526,7 @@ _ecore_x_event_handle_gesture_notify_pinchrotation(XEvent *xevent)
|
||||||
XGestureNotifyPinchRotationEvent *xpre;
|
XGestureNotifyPinchRotationEvent *xpre;
|
||||||
Ecore_X_Event_Gesture_Notify_PinchRotation *e;
|
Ecore_X_Event_Gesture_Notify_PinchRotation *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
xpre = (XGestureNotifyPinchRotationEvent *)xevent;
|
xpre = (XGestureNotifyPinchRotationEvent *)xevent;
|
||||||
|
@ -2534,7 +2553,7 @@ _ecore_x_event_handle_gesture_notify_tap(XEvent *xevent)
|
||||||
XGestureNotifyTapEvent *xte;
|
XGestureNotifyTapEvent *xte;
|
||||||
Ecore_X_Event_Gesture_Notify_Tap *e;
|
Ecore_X_Event_Gesture_Notify_Tap *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
xte = (XGestureNotifyTapEvent *)xevent;
|
xte = (XGestureNotifyTapEvent *)xevent;
|
||||||
|
@ -2560,7 +2579,7 @@ _ecore_x_event_handle_gesture_notify_tapnhold(XEvent *xevent)
|
||||||
XGestureNotifyTapNHoldEvent *xthe;
|
XGestureNotifyTapNHoldEvent *xthe;
|
||||||
Ecore_X_Event_Gesture_Notify_TapNHold *e;
|
Ecore_X_Event_Gesture_Notify_TapNHold *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
xthe = (XGestureNotifyTapNHoldEvent *)xevent;
|
xthe = (XGestureNotifyTapNHoldEvent *)xevent;
|
||||||
|
@ -2586,7 +2605,7 @@ _ecore_x_event_handle_gesture_notify_hold(XEvent *xevent)
|
||||||
XGestureNotifyHoldEvent *xhe;
|
XGestureNotifyHoldEvent *xhe;
|
||||||
Ecore_X_Event_Gesture_Notify_Hold *e;
|
Ecore_X_Event_Gesture_Notify_Hold *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
xhe = (XGestureNotifyHoldEvent *)xevent;
|
xhe = (XGestureNotifyHoldEvent *)xevent;
|
||||||
|
@ -2611,7 +2630,7 @@ _ecore_x_event_handle_gesture_notify_group(XEvent *xevent)
|
||||||
XGestureNotifyGroupEvent *xge;
|
XGestureNotifyGroupEvent *xge;
|
||||||
Ecore_X_Event_Gesture_Notify_Group *e;
|
Ecore_X_Event_Gesture_Notify_Group *e;
|
||||||
|
|
||||||
_ecore_x_last_event_mouse_move = 0;
|
_ecore_x_last_event_mouse_move = EINA_FALSE;
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
xge = (XGestureNotifyGroupEvent *)xevent;
|
xge = (XGestureNotifyGroupEvent *)xevent;
|
||||||
|
|
Loading…
Reference in New Issue