summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-18 11:21:13 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-18 11:26:52 +0100
commitd16809d648d870fd8c5943a49bb05bad04e1ac67 (patch)
tree66600e0a87ae8436858e859d7f96a45fd745f9b5 /src/lib/ecore_x
parent639869703f3e8b0ce34d83b523ff611e85cfd93b (diff)
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
Diffstat (limited to 'src/lib/ecore_x')
-rw-r--r--src/lib/ecore_x/ecore_x_events.c129
1 files changed, 74 insertions, 55 deletions
diff --git a/src/lib/ecore_x/ecore_x_events.c b/src/lib/ecore_x/ecore_x_events.c
index 61528cd..904e115 100644
--- a/src/lib/ecore_x/ecore_x_events.c
+++ b/src/lib/ecore_x/ecore_x_events.c
@@ -36,9 +36,10 @@ typedef struct _Ecore_X_Mouse_Down_Info
36 Eina_Bool did_triple : 1; 36 Eina_Bool did_triple : 1;
37} Ecore_X_Mouse_Down_Info; 37} Ecore_X_Mouse_Down_Info;
38 38
39static int _ecore_x_last_event_mouse_move = 0; 39static Eina_Bool _ecore_x_last_event_mouse_move = EINA_FALSE;
40static Ecore_Event *_ecore_x_last_event_mouse_move_event = NULL; 40static Ecore_Event *_ecore_x_last_event_mouse_move_event = NULL;
41static Eina_Inlist *_ecore_x_mouse_down_info_list = NULL; 41static Ecore_Event_Mouse_Move *_ecore_x_last_event_mouse_move_event_e = NULL;
42static Eina_Inlist *_ecore_x_mouse_down_info_list = NULL;
42 43
43#ifdef ECORE_XKB 44#ifdef ECORE_XKB
44static Eina_Hash *emitted_events = NULL; 45static Eina_Hash *emitted_events = NULL;
@@ -106,7 +107,8 @@ _ecore_x_event_free_mouse_move(void *data EINA_UNUSED,
106 if (_ecore_x_last_event_mouse_move) 107 if (_ecore_x_last_event_mouse_move)
107 { 108 {
108 _ecore_x_last_event_mouse_move_event = NULL; 109 _ecore_x_last_event_mouse_move_event = NULL;
109 _ecore_x_last_event_mouse_move = 0; 110 _ecore_x_last_event_mouse_move_event_e = NULL;
111 _ecore_x_last_event_mouse_move = EINA_FALSE;
110 } 112 }
111 113
112 free(e); 114 free(e);
@@ -283,6 +285,7 @@ _ecore_mouse_move(unsigned int timestamp,
283 _ecore_x_event_last_root_y = y_root; 285 _ecore_x_event_last_root_y = y_root;
284 286
285 _ecore_x_last_event_mouse_move_event = event; 287 _ecore_x_last_event_mouse_move_event = event;
288 _ecore_x_last_event_mouse_move_event_e = e;
286} 289}
287 290
288static void 291static void
@@ -352,7 +355,7 @@ _ecore_key_press(int event,
352 int val; 355 int val;
353 int key_len, keyname_len, compose_len; 356 int key_len, keyname_len, compose_len;
354 357
355 _ecore_x_last_event_mouse_move = 0; 358 _ecore_x_last_event_mouse_move = EINA_FALSE;
356 sym = _ecore_x_XKeycodeToKeysym(xevent->display, xevent->keycode, 0); 359 sym = _ecore_x_XKeycodeToKeysym(xevent->display, xevent->keycode, 0);
357 keyname = XKeysymToString(sym); 360 keyname = XKeysymToString(sym);
358 361
@@ -614,7 +617,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
614 617
615 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); 618 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);
616 619
617 _ecore_x_last_event_mouse_move = 0; 620 _ecore_x_last_event_mouse_move = EINA_FALSE;
618 if ((xevent->xbutton.button > 3) && (xevent->xbutton.button < 8)) 621 if ((xevent->xbutton.button > 3) && (xevent->xbutton.button < 8))
619 { 622 {
620 Ecore_Event_Mouse_Wheel *e; 623 Ecore_Event_Mouse_Wheel *e;
@@ -763,7 +766,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
763void 766void
764_ecore_x_event_handle_button_release(XEvent *xevent) 767_ecore_x_event_handle_button_release(XEvent *xevent)
765{ 768{
766 _ecore_x_last_event_mouse_move = 0; 769 _ecore_x_last_event_mouse_move = EINA_FALSE;
767 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); 770 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);
768 /* filter out wheel buttons */ 771 /* filter out wheel buttons */
769 if ((xevent->xbutton.button <= 3) || (xevent->xbutton.button > 7)) 772 if ((xevent->xbutton.button <= 3) || (xevent->xbutton.button > 7))
@@ -803,14 +806,30 @@ _ecore_x_event_handle_button_release(XEvent *xevent)
803void 806void
804_ecore_x_event_handle_motion_notify(XEvent *xevent) 807_ecore_x_event_handle_motion_notify(XEvent *xevent)
805{ 808{
806/*
807 if (_ecore_x_last_event_mouse_move) 809 if (_ecore_x_last_event_mouse_move)
808 { 810 {
809 ecore_event_del(_ecore_x_last_event_mouse_move_event); 811 Ecore_Event_Mouse_Move *e = _ecore_x_last_event_mouse_move_event_e;
810 _ecore_x_last_event_mouse_move = 0; 812
811 _ecore_x_last_event_mouse_move_event = NULL; 813 if ((e) &&
814 (xevent->xmotion.window == e->event_window) &&
815 (xevent->xmotion.root == e->root_window) &&
816 (xevent->xmotion.same_screen == e->same_screen) &&
817 (_ecore_x_event_modifiers(xevent->xmotion.state) == e->modifiers))
818 {
819 if (((xevent->xmotion.subwindow) &&
820 (xevent->xmotion.subwindow == e->window)) ||
821 ((!xevent->xmotion.subwindow) &&
822 (xevent->xmotion.window == e->window)))
823 {
824 // XXX: shouldn't we store event history in the new event
825 // with prior x,y,timestamp (all else assumed the same)
826 ecore_event_del(_ecore_x_last_event_mouse_move_event);
827 _ecore_x_last_event_mouse_move = EINA_FALSE;
828 _ecore_x_last_event_mouse_move_event = NULL;
829 }
830 }
812 } 831 }
813 */ 832
814 _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state, 833 _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state,
815 xevent->xmotion.x, xevent->xmotion.y, 834 xevent->xmotion.x, xevent->xmotion.y,
816 xevent->xmotion.x_root, xevent->xmotion.y_root, 835 xevent->xmotion.x_root, xevent->xmotion.y_root,
@@ -825,7 +844,7 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
825 xevent->xmotion.x, xevent->xmotion.y, 844 xevent->xmotion.x, xevent->xmotion.y,
826 xevent->xmotion.x_root, xevent->xmotion.y_root); 845 xevent->xmotion.x_root, xevent->xmotion.y_root);
827 846
828 _ecore_x_last_event_mouse_move = 1; 847 _ecore_x_last_event_mouse_move = EINA_TRUE;
829 848
830 /* Xdnd handling */ 849 /* Xdnd handling */
831 _ecore_x_dnd_drag(xevent->xmotion.root, 850 _ecore_x_dnd_drag(xevent->xmotion.root,
@@ -836,7 +855,7 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
836void 855void
837_ecore_x_event_handle_enter_notify(XEvent *xevent) 856_ecore_x_event_handle_enter_notify(XEvent *xevent)
838{ 857{
839 _ecore_x_last_event_mouse_move = 0; 858 _ecore_x_last_event_mouse_move = EINA_FALSE;
840 { 859 {
841 _ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state, 860 _ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
842 xevent->xcrossing.x, xevent->xcrossing.y, 861 xevent->xcrossing.x, xevent->xcrossing.y,
@@ -900,7 +919,7 @@ _ecore_x_event_handle_enter_notify(XEvent *xevent)
900void 919void
901_ecore_x_event_handle_leave_notify(XEvent *xevent) 920_ecore_x_event_handle_leave_notify(XEvent *xevent)
902{ 921{
903 _ecore_x_last_event_mouse_move = 0; 922 _ecore_x_last_event_mouse_move = EINA_FALSE;
904 { 923 {
905 _ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state, 924 _ecore_mouse_move(xevent->xcrossing.time, xevent->xcrossing.state,
906 xevent->xcrossing.x, xevent->xcrossing.y, 925 xevent->xcrossing.x, xevent->xcrossing.y,
@@ -969,7 +988,7 @@ _ecore_x_event_handle_focus_in(XEvent *xevent)
969{ 988{
970 Ecore_X_Event_Window_Focus_In *e; 989 Ecore_X_Event_Window_Focus_In *e;
971 990
972 _ecore_x_last_event_mouse_move = 0; 991 _ecore_x_last_event_mouse_move = EINA_FALSE;
973 992
974 e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_In)); 993 e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_In));
975 if (!e) 994 if (!e)
@@ -1012,7 +1031,7 @@ _ecore_x_event_handle_focus_out(XEvent *xevent)
1012{ 1031{
1013 Ecore_X_Event_Window_Focus_Out *e; 1032 Ecore_X_Event_Window_Focus_Out *e;
1014 1033
1015 _ecore_x_last_event_mouse_move = 0; 1034 _ecore_x_last_event_mouse_move = EINA_FALSE;
1016 1035
1017 e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_Out)); 1036 e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_Out));
1018 if (!e) 1037 if (!e)
@@ -1053,7 +1072,7 @@ _ecore_x_event_handle_focus_out(XEvent *xevent)
1053void 1072void
1054_ecore_x_event_handle_keymap_notify(XEvent *xevent EINA_UNUSED) 1073_ecore_x_event_handle_keymap_notify(XEvent *xevent EINA_UNUSED)
1055{ 1074{
1056 _ecore_x_last_event_mouse_move = 0; 1075 _ecore_x_last_event_mouse_move = EINA_FALSE;
1057 /* FIXME: handle this event type */ 1076 /* FIXME: handle this event type */
1058} 1077}
1059 1078
@@ -1062,7 +1081,7 @@ _ecore_x_event_handle_expose(XEvent *xevent)
1062{ 1081{
1063 Ecore_X_Event_Window_Damage *e; 1082 Ecore_X_Event_Window_Damage *e;
1064 1083
1065 _ecore_x_last_event_mouse_move = 0; 1084 _ecore_x_last_event_mouse_move = EINA_FALSE;
1066 e = calloc(1, sizeof(Ecore_X_Event_Window_Damage)); 1085 e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
1067 if (!e) 1086 if (!e)
1068 return; 1087 return;
@@ -1082,7 +1101,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
1082{ 1101{
1083 Ecore_X_Event_Window_Damage *e; 1102 Ecore_X_Event_Window_Damage *e;
1084 1103
1085 _ecore_x_last_event_mouse_move = 0; 1104 _ecore_x_last_event_mouse_move = EINA_FALSE;
1086 e = calloc(1, sizeof(Ecore_X_Event_Window_Damage)); 1105 e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
1087 if (!e) 1106 if (!e)
1088 return; 1107 return;
@@ -1100,7 +1119,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
1100void 1119void
1101_ecore_x_event_handle_visibility_notify(XEvent *xevent) 1120_ecore_x_event_handle_visibility_notify(XEvent *xevent)
1102{ 1121{
1103 _ecore_x_last_event_mouse_move = 0; 1122 _ecore_x_last_event_mouse_move = EINA_FALSE;
1104// if (xevent->xvisibility.state != VisibilityPartiallyObscured) 1123// if (xevent->xvisibility.state != VisibilityPartiallyObscured)
1105 { 1124 {
1106 Ecore_X_Event_Window_Visibility_Change *e; 1125 Ecore_X_Event_Window_Visibility_Change *e;
@@ -1125,7 +1144,7 @@ _ecore_x_event_handle_create_notify(XEvent *xevent)
1125{ 1144{
1126 Ecore_X_Event_Window_Create *e; 1145 Ecore_X_Event_Window_Create *e;
1127 1146
1128 _ecore_x_last_event_mouse_move = 0; 1147 _ecore_x_last_event_mouse_move = EINA_FALSE;
1129 e = calloc(1, sizeof(Ecore_X_Event_Window_Create)); 1148 e = calloc(1, sizeof(Ecore_X_Event_Window_Create));
1130 if (!e) 1149 if (!e)
1131 return; 1150 return;
@@ -1151,7 +1170,7 @@ _ecore_x_event_handle_destroy_notify(XEvent *xevent)
1151{ 1170{
1152 Ecore_X_Event_Window_Destroy *e; 1171 Ecore_X_Event_Window_Destroy *e;
1153 1172
1154 _ecore_x_last_event_mouse_move = 0; 1173 _ecore_x_last_event_mouse_move = EINA_FALSE;
1155 e = calloc(1, sizeof(Ecore_X_Event_Window_Destroy)); 1174 e = calloc(1, sizeof(Ecore_X_Event_Window_Destroy));
1156 if (!e) 1175 if (!e)
1157 return; 1176 return;
@@ -1172,7 +1191,7 @@ _ecore_x_event_handle_unmap_notify(XEvent *xevent)
1172{ 1191{
1173 Ecore_X_Event_Window_Hide *e; 1192 Ecore_X_Event_Window_Hide *e;
1174 1193
1175 _ecore_x_last_event_mouse_move = 0; 1194 _ecore_x_last_event_mouse_move = EINA_FALSE;
1176 e = calloc(1, sizeof(Ecore_X_Event_Window_Hide)); 1195 e = calloc(1, sizeof(Ecore_X_Event_Window_Hide));
1177 if (!e) 1196 if (!e)
1178 return; 1197 return;
@@ -1189,7 +1208,7 @@ _ecore_x_event_handle_map_notify(XEvent *xevent)
1189{ 1208{
1190 Ecore_X_Event_Window_Show *e; 1209 Ecore_X_Event_Window_Show *e;
1191 1210
1192 _ecore_x_last_event_mouse_move = 0; 1211 _ecore_x_last_event_mouse_move = EINA_FALSE;
1193 e = calloc(1, sizeof(Ecore_X_Event_Window_Show)); 1212 e = calloc(1, sizeof(Ecore_X_Event_Window_Show));
1194 if (!e) 1213 if (!e)
1195 return; 1214 return;
@@ -1205,7 +1224,7 @@ _ecore_x_event_handle_map_request(XEvent *xevent)
1205{ 1224{
1206 Ecore_X_Event_Window_Show_Request *e; 1225 Ecore_X_Event_Window_Show_Request *e;
1207 1226
1208 _ecore_x_last_event_mouse_move = 0; 1227 _ecore_x_last_event_mouse_move = EINA_FALSE;
1209 e = calloc(1, sizeof(Ecore_X_Event_Window_Show_Request)); 1228 e = calloc(1, sizeof(Ecore_X_Event_Window_Show_Request));
1210 if (!e) 1229 if (!e)
1211 return; 1230 return;
@@ -1221,7 +1240,7 @@ _ecore_x_event_handle_reparent_notify(XEvent *xevent)
1221{ 1240{
1222 Ecore_X_Event_Window_Reparent *e; 1241 Ecore_X_Event_Window_Reparent *e;
1223 1242
1224 _ecore_x_last_event_mouse_move = 0; 1243 _ecore_x_last_event_mouse_move = EINA_FALSE;
1225 e = calloc(1, sizeof(Ecore_X_Event_Window_Reparent)); 1244 e = calloc(1, sizeof(Ecore_X_Event_Window_Reparent));
1226 if (!e) 1245 if (!e)
1227 return; 1246 return;
@@ -1238,7 +1257,7 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent)
1238{ 1257{
1239 Ecore_X_Event_Window_Configure *e; 1258 Ecore_X_Event_Window_Configure *e;
1240 1259
1241 _ecore_x_last_event_mouse_move = 0; 1260 _ecore_x_last_event_mouse_move = EINA_FALSE;
1242 e = calloc(1, sizeof(Ecore_X_Event_Window_Configure)); 1261 e = calloc(1, sizeof(Ecore_X_Event_Window_Configure));
1243 if (!e) 1262 if (!e)
1244 return; 1263 return;
@@ -1262,7 +1281,7 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
1262{ 1281{
1263 Ecore_X_Event_Window_Configure_Request *e; 1282 Ecore_X_Event_Window_Configure_Request *e;
1264 1283
1265 _ecore_x_last_event_mouse_move = 0; 1284 _ecore_x_last_event_mouse_move = EINA_FALSE;
1266 e = calloc(1, sizeof(Ecore_X_Event_Window_Configure_Request)); 1285 e = calloc(1, sizeof(Ecore_X_Event_Window_Configure_Request));
1267 if (!e) 1286 if (!e)
1268 return; 1287 return;
@@ -1295,7 +1314,7 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
1295void 1314void
1296_ecore_x_event_handle_gravity_notify(XEvent *xevent EINA_UNUSED) 1315_ecore_x_event_handle_gravity_notify(XEvent *xevent EINA_UNUSED)
1297{ 1316{
1298 _ecore_x_last_event_mouse_move = 0; 1317 _ecore_x_last_event_mouse_move = EINA_FALSE;
1299 /* FIXME: handle this event type */ 1318 /* FIXME: handle this event type */
1300} 1319}
1301 1320
@@ -1304,7 +1323,7 @@ _ecore_x_event_handle_resize_request(XEvent *xevent)
1304{ 1323{
1305 Ecore_X_Event_Window_Resize_Request *e; 1324 Ecore_X_Event_Window_Resize_Request *e;
1306 1325
1307 _ecore_x_last_event_mouse_move = 0; 1326 _ecore_x_last_event_mouse_move = EINA_FALSE;
1308 e = calloc(1, sizeof(Ecore_X_Event_Window_Resize_Request)); 1327 e = calloc(1, sizeof(Ecore_X_Event_Window_Resize_Request));
1309 if (!e) 1328 if (!e)
1310 return; 1329 return;
@@ -1321,7 +1340,7 @@ _ecore_x_event_handle_circulate_notify(XEvent *xevent)
1321{ 1340{
1322 Ecore_X_Event_Window_Stack *e; 1341 Ecore_X_Event_Window_Stack *e;
1323 1342
1324 _ecore_x_last_event_mouse_move = 0; 1343 _ecore_x_last_event_mouse_move = EINA_FALSE;
1325 e = calloc(1, sizeof(Ecore_X_Event_Window_Stack)); 1344 e = calloc(1, sizeof(Ecore_X_Event_Window_Stack));
1326 if (!e) 1345 if (!e)
1327 return; 1346 return;
@@ -1342,7 +1361,7 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent)
1342{ 1361{
1343 Ecore_X_Event_Window_Stack_Request *e; 1362 Ecore_X_Event_Window_Stack_Request *e;
1344 1363
1345 _ecore_x_last_event_mouse_move = 0; 1364 _ecore_x_last_event_mouse_move = EINA_FALSE;
1346 e = calloc(1, sizeof(Ecore_X_Event_Window_Stack_Request)); 1365 e = calloc(1, sizeof(Ecore_X_Event_Window_Stack_Request));
1347 if (!e) 1366 if (!e)
1348 return; 1367 return;
@@ -1361,7 +1380,7 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent)
1361void 1380void
1362_ecore_x_event_handle_property_notify(XEvent *xevent) 1381_ecore_x_event_handle_property_notify(XEvent *xevent)
1363{ 1382{
1364 _ecore_x_last_event_mouse_move = 0; 1383 _ecore_x_last_event_mouse_move = EINA_FALSE;
1365 { 1384 {
1366 Ecore_X_Event_Window_Property *e; 1385 Ecore_X_Event_Window_Property *e;
1367 1386
@@ -1386,7 +1405,7 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent)
1386 Ecore_X_Atom sel; 1405 Ecore_X_Atom sel;
1387 1406
1388 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1407 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1389 _ecore_x_last_event_mouse_move = 0; 1408 _ecore_x_last_event_mouse_move = EINA_FALSE;
1390 d = _ecore_x_selection_get(xevent->xselectionclear.selection); 1409 d = _ecore_x_selection_get(xevent->xselectionclear.selection);
1391 if (d && (xevent->xselectionclear.time <= d->time)) return; 1410 if (d && (xevent->xselectionclear.time <= d->time)) return;
1392/* errr..... why? paranoia. 1411/* errr..... why? paranoia.
@@ -1425,7 +1444,7 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
1425 int typesize; 1444 int typesize;
1426 1445
1427 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1446 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1428 _ecore_x_last_event_mouse_move = 0; 1447 _ecore_x_last_event_mouse_move = EINA_FALSE;
1429 /* 1448 /*
1430 * Generate a selection request event. 1449 * Generate a selection request event.
1431 */ 1450 */
@@ -1492,7 +1511,7 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
1492 int num_ret, format; 1511 int num_ret, format;
1493 1512
1494 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1513 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1495 _ecore_x_last_event_mouse_move = 0; 1514 _ecore_x_last_event_mouse_move = EINA_FALSE;
1496 selection = xevent->xselection.selection; 1515 selection = xevent->xselection.selection;
1497 1516
1498 if (xevent->xselection.target == ECORE_X_ATOM_SELECTION_TARGETS) 1517 if (xevent->xselection.target == ECORE_X_ATOM_SELECTION_TARGETS)
@@ -1557,7 +1576,7 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
1557{ 1576{
1558 Ecore_X_Event_Window_Colormap *e; 1577 Ecore_X_Event_Window_Colormap *e;
1559 1578
1560 _ecore_x_last_event_mouse_move = 0; 1579 _ecore_x_last_event_mouse_move = EINA_FALSE;
1561 e = calloc(1, sizeof(Ecore_X_Event_Window_Colormap)); 1580 e = calloc(1, sizeof(Ecore_X_Event_Window_Colormap));
1562 if (!e) 1581 if (!e)
1563 return; 1582 return;
@@ -1576,7 +1595,7 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
1576void 1595void
1577_ecore_x_event_handle_client_message(XEvent *xevent) 1596_ecore_x_event_handle_client_message(XEvent *xevent)
1578{ 1597{
1579 _ecore_x_last_event_mouse_move = 0; 1598 _ecore_x_last_event_mouse_move = EINA_FALSE;
1580 /* Special client message event handling here. need to put LOTS of if */ 1599 /* Special client message event handling here. need to put LOTS of if */
1581 /* checks here and generate synthetic events per special message known */ 1600 /* checks here and generate synthetic events per special message known */
1582 /* otherwise generate generic client message event. this would handle*/ 1601 /* otherwise generate generic client message event. this would handle*/
@@ -2050,7 +2069,7 @@ _ecore_x_event_handle_mapping_notify(XEvent *xevent)
2050 static unsigned long last_serial; 2069 static unsigned long last_serial;
2051 int type; 2070 int type;
2052 2071
2053 _ecore_x_last_event_mouse_move = 0; 2072 _ecore_x_last_event_mouse_move = EINA_FALSE;
2054 2073
2055 switch (xevent->xmapping.request) 2074 switch (xevent->xmapping.request)
2056 { 2075 {
@@ -2092,7 +2111,7 @@ _ecore_x_event_handle_shape_change(XEvent *xevent)
2092 XShapeEvent *shape_event; 2111 XShapeEvent *shape_event;
2093 Ecore_X_Event_Window_Shape *e; 2112 Ecore_X_Event_Window_Shape *e;
2094 2113
2095 _ecore_x_last_event_mouse_move = 0; 2114 _ecore_x_last_event_mouse_move = EINA_FALSE;
2096 shape_event = (XShapeEvent *)xevent; 2115 shape_event = (XShapeEvent *)xevent;
2097 e = calloc(1, sizeof(Ecore_X_Event_Window_Shape)); 2116 e = calloc(1, sizeof(Ecore_X_Event_Window_Shape));
2098 if (!e) 2117 if (!e)
@@ -2132,7 +2151,7 @@ _ecore_x_event_handle_screensaver_notify(XEvent *xevent)
2132 XScreenSaverNotifyEvent *screensaver_event; 2151 XScreenSaverNotifyEvent *screensaver_event;
2133 Ecore_X_Event_Screensaver_Notify *e; 2152 Ecore_X_Event_Screensaver_Notify *e;
2134 2153
2135 _ecore_x_last_event_mouse_move = 0; 2154 _ecore_x_last_event_mouse_move = EINA_FALSE;
2136 screensaver_event = (XScreenSaverNotifyEvent *)xevent; 2155 screensaver_event = (XScreenSaverNotifyEvent *)xevent;
2137 e = calloc(1, sizeof(Ecore_X_Event_Screensaver_Notify)); 2156 e = calloc(1, sizeof(Ecore_X_Event_Screensaver_Notify));
2138 if (!e) 2157 if (!e)
@@ -2158,7 +2177,7 @@ _ecore_x_event_handle_sync_counter(XEvent *xevent)
2158 XSyncCounterNotifyEvent *sync_counter_event; 2177 XSyncCounterNotifyEvent *sync_counter_event;
2159 Ecore_X_Event_Sync_Counter *e; 2178 Ecore_X_Event_Sync_Counter *e;
2160 2179
2161 _ecore_x_last_event_mouse_move = 0; 2180 _ecore_x_last_event_mouse_move = EINA_FALSE;
2162 sync_counter_event = (XSyncCounterNotifyEvent *)xevent; 2181 sync_counter_event = (XSyncCounterNotifyEvent *)xevent;
2163 e = calloc(1, sizeof(Ecore_X_Event_Sync_Counter)); 2182 e = calloc(1, sizeof(Ecore_X_Event_Sync_Counter));
2164 if (!e) 2183 if (!e)
@@ -2174,7 +2193,7 @@ _ecore_x_event_handle_sync_alarm(XEvent *xevent)
2174 XSyncAlarmNotifyEvent *sync_alarm_event; 2193 XSyncAlarmNotifyEvent *sync_alarm_event;
2175 Ecore_X_Event_Sync_Alarm *e; 2194 Ecore_X_Event_Sync_Alarm *e;
2176 2195
2177 _ecore_x_last_event_mouse_move = 0; 2196 _ecore_x_last_event_mouse_move = EINA_FALSE;
2178 sync_alarm_event = (XSyncAlarmNotifyEvent *)xevent; 2197 sync_alarm_event = (XSyncAlarmNotifyEvent *)xevent;
2179 2198
2180 e = calloc(1, sizeof(Ecore_X_Event_Sync_Alarm)); 2199 e = calloc(1, sizeof(Ecore_X_Event_Sync_Alarm));
@@ -2193,7 +2212,7 @@ _ecore_x_event_handle_randr_change(XEvent *xevent)
2193 XRRScreenChangeNotifyEvent *randr_event; 2212 XRRScreenChangeNotifyEvent *randr_event;
2194 Ecore_X_Event_Screen_Change *e; 2213 Ecore_X_Event_Screen_Change *e;
2195 2214
2196 _ecore_x_last_event_mouse_move = 0; 2215 _ecore_x_last_event_mouse_move = EINA_FALSE;
2197 randr_event = (XRRScreenChangeNotifyEvent *)xevent; 2216 randr_event = (XRRScreenChangeNotifyEvent *)xevent;
2198 if (!XRRUpdateConfiguration(xevent)) 2217 if (!XRRUpdateConfiguration(xevent))
2199 ERR("Can't update RR config!"); 2218 ERR("Can't update RR config!");
@@ -2288,7 +2307,7 @@ _ecore_x_event_handle_randr_notify(XEvent *xevent)
2288{ 2307{
2289 const XRRNotifyEvent *randr_event; 2308 const XRRNotifyEvent *randr_event;
2290 2309
2291 _ecore_x_last_event_mouse_move = 0; 2310 _ecore_x_last_event_mouse_move = EINA_FALSE;
2292 randr_event = (const XRRNotifyEvent *)xevent; 2311 randr_event = (const XRRNotifyEvent *)xevent;
2293 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2312 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2294 switch (randr_event->subtype) 2313 switch (randr_event->subtype)
@@ -2323,7 +2342,7 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event)
2323 Ecore_X_Event_Fixes_Selection_Notify *e; 2342 Ecore_X_Event_Fixes_Selection_Notify *e;
2324 Ecore_X_Atom sel; 2343 Ecore_X_Atom sel;
2325 2344
2326 _ecore_x_last_event_mouse_move = 0; 2345 _ecore_x_last_event_mouse_move = EINA_FALSE;
2327 /* Nothing here yet */ 2346 /* Nothing here yet */
2328 2347
2329 e = calloc(1, sizeof(*e)); 2348 e = calloc(1, sizeof(*e));
@@ -2359,7 +2378,7 @@ _ecore_x_event_handle_damage_notify(XEvent *event)
2359 XDamageNotifyEvent *damage_event; 2378 XDamageNotifyEvent *damage_event;
2360 Ecore_X_Event_Damage *e; 2379 Ecore_X_Event_Damage *e;
2361 2380
2362 _ecore_x_last_event_mouse_move = 0; 2381 _ecore_x_last_event_mouse_move = EINA_FALSE;
2363 damage_event = (XDamageNotifyEvent *)event; 2382 damage_event = (XDamageNotifyEvent *)event;
2364 2383
2365 e = calloc(1, sizeof(Ecore_X_Event_Damage)); 2384 e = calloc(1, sizeof(Ecore_X_Event_Damage));
@@ -2454,7 +2473,7 @@ _ecore_x_event_handle_gesture_notify_flick(XEvent *xevent)
2454 XGestureNotifyFlickEvent *xfe; 2473 XGestureNotifyFlickEvent *xfe;
2455 Ecore_X_Event_Gesture_Notify_Flick *e; 2474 Ecore_X_Event_Gesture_Notify_Flick *e;
2456 2475
2457 _ecore_x_last_event_mouse_move = 0; 2476 _ecore_x_last_event_mouse_move = EINA_FALSE;
2458 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2477 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2459 2478
2460 xfe = (XGestureNotifyFlickEvent *)xevent; 2479 xfe = (XGestureNotifyFlickEvent *)xevent;
@@ -2480,7 +2499,7 @@ _ecore_x_event_handle_gesture_notify_pan(XEvent *xevent)
2480 XGestureNotifyPanEvent *xpe; 2499 XGestureNotifyPanEvent *xpe;
2481 Ecore_X_Event_Gesture_Notify_Pan *e; 2500 Ecore_X_Event_Gesture_Notify_Pan *e;
2482 2501
2483 _ecore_x_last_event_mouse_move = 0; 2502 _ecore_x_last_event_mouse_move = EINA_FALSE;
2484 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2503 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2485 2504
2486 xpe = (XGestureNotifyPanEvent *)xevent; 2505 xpe = (XGestureNotifyPanEvent *)xevent;
@@ -2507,7 +2526,7 @@ _ecore_x_event_handle_gesture_notify_pinchrotation(XEvent *xevent)
2507 XGestureNotifyPinchRotationEvent *xpre; 2526 XGestureNotifyPinchRotationEvent *xpre;
2508 Ecore_X_Event_Gesture_Notify_PinchRotation *e; 2527 Ecore_X_Event_Gesture_Notify_PinchRotation *e;
2509 2528
2510 _ecore_x_last_event_mouse_move = 0; 2529 _ecore_x_last_event_mouse_move = EINA_FALSE;
2511 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2530 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2512 2531
2513 xpre = (XGestureNotifyPinchRotationEvent *)xevent; 2532 xpre = (XGestureNotifyPinchRotationEvent *)xevent;
@@ -2534,7 +2553,7 @@ _ecore_x_event_handle_gesture_notify_tap(XEvent *xevent)
2534 XGestureNotifyTapEvent *xte; 2553 XGestureNotifyTapEvent *xte;
2535 Ecore_X_Event_Gesture_Notify_Tap *e; 2554 Ecore_X_Event_Gesture_Notify_Tap *e;
2536 2555
2537 _ecore_x_last_event_mouse_move = 0; 2556 _ecore_x_last_event_mouse_move = EINA_FALSE;
2538 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2557 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2539 2558
2540 xte = (XGestureNotifyTapEvent *)xevent; 2559 xte = (XGestureNotifyTapEvent *)xevent;
@@ -2560,7 +2579,7 @@ _ecore_x_event_handle_gesture_notify_tapnhold(XEvent *xevent)
2560 XGestureNotifyTapNHoldEvent *xthe; 2579 XGestureNotifyTapNHoldEvent *xthe;
2561 Ecore_X_Event_Gesture_Notify_TapNHold *e; 2580 Ecore_X_Event_Gesture_Notify_TapNHold *e;
2562 2581
2563 _ecore_x_last_event_mouse_move = 0; 2582 _ecore_x_last_event_mouse_move = EINA_FALSE;
2564 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2583 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2565 2584
2566 xthe = (XGestureNotifyTapNHoldEvent *)xevent; 2585 xthe = (XGestureNotifyTapNHoldEvent *)xevent;
@@ -2586,7 +2605,7 @@ _ecore_x_event_handle_gesture_notify_hold(XEvent *xevent)
2586 XGestureNotifyHoldEvent *xhe; 2605 XGestureNotifyHoldEvent *xhe;
2587 Ecore_X_Event_Gesture_Notify_Hold *e; 2606 Ecore_X_Event_Gesture_Notify_Hold *e;
2588 2607
2589 _ecore_x_last_event_mouse_move = 0; 2608 _ecore_x_last_event_mouse_move = EINA_FALSE;
2590 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2609 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2591 2610
2592 xhe = (XGestureNotifyHoldEvent *)xevent; 2611 xhe = (XGestureNotifyHoldEvent *)xevent;
@@ -2611,7 +2630,7 @@ _ecore_x_event_handle_gesture_notify_group(XEvent *xevent)
2611 XGestureNotifyGroupEvent *xge; 2630 XGestureNotifyGroupEvent *xge;
2612 Ecore_X_Event_Gesture_Notify_Group *e; 2631 Ecore_X_Event_Gesture_Notify_Group *e;
2613 2632
2614 _ecore_x_last_event_mouse_move = 0; 2633 _ecore_x_last_event_mouse_move = EINA_FALSE;
2615 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2634 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2616 2635
2617 xge = (XGestureNotifyGroupEvent *)xevent; 2636 xge = (XGestureNotifyGroupEvent *)xevent;