+ return m_overlayWindow != NULL ;
+}
+
+void wxOverlayImpl::MacGetBounds( Rect *bounds )
+{
+ wxPoint origin(0,0);
+ origin = m_window->ClientToScreen( origin );
+ bounds->top = origin.y;
+ bounds->left = origin.x;
+ bounds->bottom = origin.y+m_y+m_height;
+ bounds->right = origin.x+m_x+m_width;
+}
+
+OSStatus wxOverlayImpl::CreateOverlayWindow()
+{
+ OSStatus err;
+
+ WindowAttributes overlayAttributes = kWindowIgnoreClicksAttribute;
+
+ m_overlayParentWindow =(WindowRef) m_window->MacGetTopLevelWindowRef();
+
+ Rect bounds ;
+ MacGetBounds(&bounds);
+ err = CreateNewWindow( kOverlayWindowClass, overlayAttributes, &bounds, &m_overlayWindow );
+ if ( err == noErr )
+ {
+ SetWindowGroup( m_overlayWindow, GetWindowGroup(m_overlayParentWindow)); // Put them in the same group so that their window layers are consistent
+ ShowWindow(m_overlayWindow);
+ }
+ return err;