+ case ClientMessage:
+ {
+ Atom wm_delete_window = XInternAtom(wxGlobalDisplay(), "WM_DELETE_WINDOW", True);;
+ Atom wm_protocols = XInternAtom(wxGlobalDisplay(), "WM_PROTOCOLS", True);;
+
+ if (event->xclient.message_type == wm_protocols)
+ {
+ if (event->xclient.data.l[0] == wm_delete_window)
+ {
+ if (win)
+ {
+ win->Close(FALSE);
+ }
+ }
+ }
+ return;
+ }