Enlightenment CVS committal
Author : moom
Project : e17
Module : proto
Dir : e17/proto/etk/src/lib
Modified Files:
etk_engine.c etk_engine.h etk_popup_window.c
Log Message:
* [Etk_Engine] Add etk_engine_event_timestamp_get()
* [Etk_Popup_Window] Use etk_engine_event_timestamp_get() to fix a bug
with Bulgarian X :)
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_engine.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- etk_engine.c 6 Oct 2006 17:04:14 -0000 1.13
+++ etk_engine.c 8 Oct 2006 10:04:54 -0000 1.14
@@ -745,7 +745,7 @@
/**
* @internal
- * @brief Sets the callback to call when an input event is emitted
+ * @brief Calls the engine's method to set the callback to call when an input
event is emitted
* @param callback the function to call
* @param data the data to pass to the callback
* @note This function is already used by Etk_Event, you must not use it. Use
etk_event_global_callback_add() instead
@@ -758,6 +758,17 @@
}
/**
+ * @brief Calls the engine's method to get the current timestamp used by the
events
+ * @return Returns the current event timestamp
+ */
+unsigned int etk_engine_event_timestamp_get(void)
+{
+ if (!_engine || !_engine->event_timestamp_get)
+ return 0;
+ return _engine->event_timestamp_get();
+}
+
+/**
* @brief Calls the engine's method to get the position of the mouse pointer,
relative to the screen
* @param x the location where to store the x position of the mouse pointer
* @param y the location where to store the y position of the mouse pointer
@@ -901,6 +912,8 @@
INHERIT(popup_window_popdown);
INHERIT(event_callback_set);
+ INHERIT(event_timestamp_get);
+
INHERIT(mouse_position_get);
INHERIT(mouse_screen_geometry_get);
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_engine.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- etk_engine.h 6 Oct 2006 17:04:14 -0000 1.12
+++ etk_engine.h 8 Oct 2006 10:04:54 -0000 1.13
@@ -74,6 +74,8 @@
void (*popup_window_popdown)(Etk_Popup_Window *popup_window);
void (*event_callback_set)(void (*callback)(Etk_Event_Type event,
Etk_Event_Global event_info));
+ unsigned int (*event_timestamp_get)(void);
+
void (*mouse_position_get)(int *x, int *y);
void (*mouse_screen_geometry_get)(int *x, int *y, int *w, int *h);
@@ -82,6 +84,7 @@
void (*selection_clear)(Etk_Selection_Type selection);
+
void (*drag_constructor)(Etk_Drag *drag);
void (*drag_begin)(Etk_Drag *drag);
};
@@ -141,7 +144,9 @@
void etk_engine_popup_window_popup(Etk_Popup_Window *popup_window);
void etk_engine_popup_window_popdown(Etk_Popup_Window *popup_window);
-void etk_engine_event_callback_set(void (*callback)(Etk_Event_Type event,
Etk_Event_Global event_info));
+void etk_engine_event_callback_set(void (*callback)(Etk_Event_Type
event, Etk_Event_Global event_info));
+unsigned int etk_engine_event_timestamp_get(void);
+
void etk_engine_mouse_position_get(int *x, int *y);
void etk_engine_mouse_screen_geometry_get(int *x, int *y, int *w, int *h);
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_popup_window.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- etk_popup_window.c 7 Oct 2006 18:45:16 -0000 1.15
+++ etk_popup_window.c 8 Oct 2006 10:04:54 -0000 1.16
@@ -230,7 +230,7 @@
if (!popup_window->parent || !popup_window->parent->popped_up)
{
_etk_popup_window_popped_parents =
evas_list_append(_etk_popup_window_popped_parents, popup_window);
- _etk_popup_window_popup_timestamp = etk_current_time_get();
+ _etk_popup_window_popup_timestamp = etk_engine_event_timestamp_get();
}
if (popup_window->parent)
{
@@ -400,8 +400,8 @@
Etk_Popup_Window *pop;
int px, py;
- if (event_info.mouse_move.timestamp < _etk_popup_window_popup_timestamp)
- return;
+ /*if (event_info.mouse_move.timestamp < _etk_popup_window_popup_timestamp)
+ return;*/
pop =
ETK_POPUP_WINDOW(evas_list_data(evas_list_last(_etk_popup_window_popped_parents)));
for ( ; pop; pop = pop->popped_child)
@@ -529,7 +529,7 @@
/* We feed a mouse-move event since the relative position between the
mouse pointer
* and the popup window has changed */
etk_engine_mouse_position_get(&mx, &my);
- evas_event_feed_mouse_move(ETK_TOPLEVEL(pwin)->evas, mx - x, my - y,
etk_current_time_get(), NULL);
+ evas_event_feed_mouse_move(ETK_TOPLEVEL(pwin)->evas, mx - x, my - y,
etk_engine_event_timestamp_get(), NULL);
}
return 1;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs