Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/dox


Modified Files:
        dox.c 


Log Message:
Close properly.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/dox.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- dox.c       19 Mar 2005 16:39:52 -0000      1.34
+++ dox.c       29 May 2005 09:32:18 -0000      1.35
@@ -57,6 +57,9 @@
 Imlib_Image        *im_exit1, *im_exit2;
 char               *docdir = NULL;
 
+static Atom         ATOM_WM_DELETE_WINDOW = None;
+static Atom         ATOM_WM_PROTOCOLS = None;
+
 static              Window
 FindRootWindow(Display * dpy)
 {
@@ -153,6 +156,10 @@
    hnt.max_height = hh;
    XSetWMNormalHints(disp, win, &hnt);
 
+   ATOM_WM_PROTOCOLS = XInternAtom(disp, "WM_PROTOCOLS", False);
+   ATOM_WM_DELETE_WINDOW = XInternAtom(disp, "WM_DELETE_WINDOW", False);
+   XSetWMProtocols(disp, win, &ATOM_WM_DELETE_WINDOW, 1);
+
    return win;
 }
 
@@ -664,10 +671,17 @@
                  }
             }
             break;
+         case ClientMessage:
+            if (ev.xclient.message_type == ATOM_WM_PROTOCOLS &&
+                (Atom) ev.xclient.data.l[0] == ATOM_WM_DELETE_WINDOW)
+               goto done;
+            break;
          default:
             break;
          }
      }
+ done:
+   return 0;
 }
 
 void




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to