+ } else {
+ // if we're left in an iconic state, the client wont be mapped. this is
+ // bad, since we will no longer be managing the window on restart
+ if (_iconic)
+ XMapWindow(**otk::display, _window);
+ }
+}
+
+
+bool Client::validate() const
+{
+ XSync(**otk::display, false); // get all events on the server
+
+ XEvent e;
+ if (XCheckTypedWindowEvent(**otk::display, _window, DestroyNotify, &e) ||
+ XCheckTypedWindowEvent(**otk::display, _window, UnmapNotify, &e)) {
+ XPutBackEvent(**otk::display, &e);
+ return false;