add call for geting mosue xy - last_xy wasnt good enough :(

SVN revision: 14511
This commit is contained in:
Carsten Haitzler 2005-04-30 06:55:20 +00:00
parent ab518488f3
commit b6d502936e
2 changed files with 13 additions and 0 deletions

View File

@ -1284,6 +1284,7 @@ EAPI void ecore_x_window_key_ungrab(Ecore_X_Window win, char *key,
EAPI void ecore_x_focus_reset(void);
EAPI void ecore_x_events_allow_all(void);
EAPI void ecore_x_pointer_last_xy_get(int *x, int *y);
EAPI void ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y);
#ifdef __cplusplus
}

View File

@ -1551,6 +1551,18 @@ ecore_x_pointer_last_xy_get(int *x, int *y)
if (x) *x = _ecore_x_event_last_root_x;
if (y) *y = _ecore_x_event_last_root_y;
}
void
ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
{
Window rwin, cwin;
int rx, ry, wx, wy;
unsigned int mask;
XQueryPointer(_ecore_x_disp, win, &rwin, &cwin, &rx, &ry, &wx, &wy, &mask);
if (x) *x = wx;
if (y) *y = wy;
}
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/