summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c')
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
index 4530b0c..0a7b3c8 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
@@ -1957,6 +1957,66 @@ ecore_x_mouse_up_send(Ecore_X_Window win,
1957 return XSendEvent(_ecore_x_disp, win, True, ButtonReleaseMask, &xev) ? EINA_TRUE : EINA_FALSE; 1957 return XSendEvent(_ecore_x_disp, win, True, ButtonReleaseMask, &xev) ? EINA_TRUE : EINA_FALSE;
1958} 1958}
1959 1959
1960EAPI Eina_Bool
1961ecore_x_mouse_in_send(Ecore_X_Window win,
1962 int x,
1963 int y)
1964{
1965 XEvent xev;
1966 XWindowAttributes att;
1967 Window tw;
1968 int rx, ry;
1969
1970 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1971 XGetWindowAttributes(_ecore_x_disp, win, &att);
1972 XTranslateCoordinates(_ecore_x_disp, win, att.root, x, y, &rx, &ry, &tw);
1973 xev.xcrossing.type = EnterNotify;
1974 xev.xcrossing.window = win;
1975 xev.xcrossing.root = att.root;
1976 xev.xcrossing.subwindow = win;
1977 xev.xcrossing.time = _ecore_x_event_last_time;
1978 xev.xcrossing.x = x;
1979 xev.xcrossing.y = y;
1980 xev.xcrossing.x_root = rx;
1981 xev.xcrossing.y_root = ry;
1982 xev.xcrossing.mode = NotifyNormal;
1983 xev.xcrossing.detail = NotifyNonlinear;
1984 xev.xcrossing.same_screen = 1;
1985 xev.xcrossing.focus = 0;
1986 xev.xcrossing.state = 0;
1987 return XSendEvent(_ecore_x_disp, win, True, EnterWindowMask, &xev) ? EINA_TRUE : EINA_FALSE;
1988}
1989
1990EAPI Eina_Bool
1991ecore_x_mouse_out_send(Ecore_X_Window win,
1992 int x,
1993 int y)
1994{
1995 XEvent xev;
1996 XWindowAttributes att;
1997 Window tw;
1998 int rx, ry;
1999
2000 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2001 XGetWindowAttributes(_ecore_x_disp, win, &att);
2002 XTranslateCoordinates(_ecore_x_disp, win, att.root, x, y, &rx, &ry, &tw);
2003 xev.xcrossing.type = LeaveNotify;
2004 xev.xcrossing.window = win;
2005 xev.xcrossing.root = att.root;
2006 xev.xcrossing.subwindow = win;
2007 xev.xcrossing.time = _ecore_x_event_last_time;
2008 xev.xcrossing.x = x;
2009 xev.xcrossing.y = y;
2010 xev.xcrossing.x_root = rx;
2011 xev.xcrossing.y_root = ry;
2012 xev.xcrossing.mode = NotifyNormal;
2013 xev.xcrossing.detail = NotifyNonlinear;
2014 xev.xcrossing.same_screen = 1;
2015 xev.xcrossing.focus = 0;
2016 xev.xcrossing.state = 0;
2017 return XSendEvent(_ecore_x_disp, win, True, LeaveWindowMask, &xev) ? EINA_TRUE : EINA_FALSE;
2018}
2019
1960EAPI void 2020EAPI void
1961ecore_x_focus_reset(void) 2021ecore_x_focus_reset(void)
1962{ 2022{