Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
ecore_x_window.c Ecore_X.h
Log Message:
added ecore_x_window_delete_request_send
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ecore_x_window.c 12 Aug 2004 11:29:18 -0000 1.21
+++ ecore_x_window.c 23 Aug 2004 10:44:21 -0000 1.22
@@ -239,7 +239,36 @@
void
ecore_x_window_del(Ecore_X_Window win)
{
- XDestroyWindow(_ecore_x_disp, win);
+ /* sorry sir, deleting the root window doesn't sound like
+ * a smart idea.
+ */
+ if (win)
+ XDestroyWindow(_ecore_x_disp, win);
+}
+
+/**
+ * Sends a delete request to the given window.
+ * @param win The given window.
+ * @ingroup Evas_X_Window_Destroy_Group
+ */
+void
+ecore_x_window_delete_request_send(Ecore_X_Window win)
+{
+ /* sorry sir, deleting the root window doesn't sound like
+ * a smart idea.
+ */
+ 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_wm_delete_window;
+ xev.xclient.data.l[1] = CurrentTime;
+
+ XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
}
/**
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- Ecore_X.h 23 Aug 2004 08:55:42 -0000 1.50
+++ Ecore_X.h 23 Aug 2004 10:44:22 -0000 1.51
@@ -739,6 +739,7 @@
Ecore_X_Window ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int
w, int h);
Ecore_X_Window ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w,
int h);
void ecore_x_window_del(Ecore_X_Window win);
+void ecore_x_window_delete_request_send(Ecore_X_Window win);
void ecore_x_window_show(Ecore_X_Window win);
void ecore_x_window_hide(Ecore_X_Window win);
void ecore_x_window_move(Ecore_X_Window win, int x, int y);
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs