+
+void
+WindowProxy::map_handler ()
+{
+ vistracker = new Gtkmm2ext::VisibilityTracker (*_window);
+ /* emit our own signal */
+ signal_map ();
+}
+
+void
+WindowProxy::unmap_handler ()
+{
+ /* emit out own signal */
+ signal_unmap ();
+}
+
+bool
+WindowProxy::configure_handler (GdkEventConfigure* ev)
+{
+ /* stupidly, the geometry data in the event isn't the same as we get
+ from the window geometry APIs.so we have to actively interrogate
+ them to get the new information.
+
+ the difference is generally down to window manager framing.
+ */
+ if (!visible() || !_window->is_mapped()) {
+ return false;
+ }
+ save_pos_and_size ();
+ return false;
+}
+
+
+bool
+WindowProxy::visible() const
+{
+ if (vistracker) {
+ /* update with current state */
+ _visible = vistracker->partially_visible();
+ }
+ return _visible;
+}
+
+bool
+WindowProxy::fully_visible () const
+{
+ if (!vistracker) {
+ /* no vistracker .. no window .. cannot be fully visible */
+ return false;
+ }
+ return vistracker->fully_visible();
+}
+