#include "wx/toolbar.h"
#include "wx/statusbr.h"
#include "wx/dcclient.h"
+
+#include "glib.h"
+#include "gdk/gdk.h"
+#include "gtk/gtk.h"
#include "wx/gtk/win_gtk.h"
//-----------------------------------------------------------------------------
m_widget = gtk_window_new( win_type );
+#ifdef __WXDEBUG__
+ debug_focus_in( m_widget, "wxFrame::m_widget", name );
+#endif
+
if ((size.x != -1) && (size.y != -1))
gtk_widget_set_usize( m_widget, m_width, m_height );
if ((pos.x != -1) && (pos.y != -1))
gtk_widget_show( m_wxwindow );
GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
+#ifdef __WXDEBUG__
+ debug_focus_in( m_wxwindow, "wxFrame::m_wxwindow", name );
+#endif
+
gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );
gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
if (m_frameToolBar) delete m_frameToolBar;
wxTopLevelWindows.DeleteObject( this );
- if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop();
+
+ if (wxTheApp->GetTopWindow() == this)
+ {
+ wxTheApp->SetTopWindow( (wxWindow*) NULL );
+ }
+
+ if (wxTopLevelWindows.Number() == 0)
+ {
+ wxTheApp->ExitMainLoop();
+ }
}
bool wxFrame::Show( bool show )
if (m_frameMenuBar)
{
int xx = m_miniEdge;
- int yy = m_miniEdge + m_miniTitle;
- int ww = m_width - 2*m_miniEdge;
- int hh = wxMENU_HEIGHT;
+ int yy = m_miniEdge + m_miniTitle;
+ int ww = m_width - 2*m_miniEdge;
+ int hh = wxMENU_HEIGHT;
m_frameMenuBar->m_x = xx;
m_frameMenuBar->m_y = yy;
m_frameMenuBar->m_width = ww;
if (m_frameToolBar)
{
int xx = m_miniEdge;
- int yy = m_miniEdge + m_miniTitle;
+ int yy = m_miniEdge + m_miniTitle;
if (m_frameMenuBar) yy += wxMENU_HEIGHT;
- int ww = m_width - 2*m_miniEdge;
+ int ww = m_width - 2*m_miniEdge;
int hh = m_frameToolBar->m_height;
m_frameToolBar->m_x = xx;
if (m_frameStatusBar)
{
int xx = 0 + m_miniEdge;
- int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge;
- int ww = m_width - 2*m_miniEdge;
- int hh = wxSTATUS_HEIGHT;
+ int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge;
+ int ww = m_width - 2*m_miniEdge;
+ int hh = wxSTATUS_HEIGHT;
m_frameStatusBar->m_x = xx;
m_frameStatusBar->m_y = yy;