Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        Ecore_X.h ecore_x_netwm.c 


Log Message:
Function to ping windows with _NET_WM_PING.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -3 -r1.130 -r1.131
--- Ecore_X.h   4 Jun 2005 10:01:23 -0000       1.130
+++ Ecore_X.h   5 Jun 2005 14:38:42 -0000       1.131
@@ -1217,11 +1217,7 @@
 EAPI int                 ecore_x_netwm_icon_get(Ecore_X_Window win, int 
*width, int *height, unsigned int **data, int *num);
 EAPI void                ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, 
int x, int y, int width, int height);
 EAPI int                 ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, 
int *x, int *y, int *width, int *height);
-#if 0
-/* FIXME */
-EAPI void                ecore_x_netwm_icon_set();
-EAPI int                 ecore_x_netwm_icon_get();
-#endif
+EAPI void                ecore_x_netwm_ping(Ecore_X_Window win);
 EAPI void                ecore_x_netwm_pid_set(Ecore_X_Window win, int pid);
 EAPI int                 ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid);
 EAPI void                ecore_x_netwm_handled_icons_set(Ecore_X_Window win);
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_netwm.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- ecore_x_netwm.c     5 Jun 2005 08:25:48 -0000       1.31
+++ ecore_x_netwm.c     5 Jun 2005 14:38:42 -0000       1.32
@@ -1309,3 +1309,24 @@
    return 1;
 }
 
+void
+ecore_x_netwm_ping(Ecore_X_Window win)
+{
+   XEvent xev;
+
+   if (!win) return;
+
+   xev.xclient.type = ClientMessage;
+   xev.xclient.display = _ecore_x_disp;
+   xev.xclient.window = win;
+   xev.xclient.message_type = ECORE_X_ATOM_WM_PROTOCOLS;
+   xev.xclient.format = 32;
+   xev.xclient.data.l[0] = ECORE_X_ATOM_NET_WM_PING;
+   xev.xclient.data.l[1] = CurrentTime;
+   xev.xclient.data.l[2] = win;
+   xev.xclient.data.l[3] = 0;
+   xev.xclient.data.l[4] = 0;
+   xev.xclient.data.l[5] = 0;
+
+   XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
+}




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to