// "configure_event"
//-----------------------------------------------------------------------------
-static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win )
+static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
if (!win->m_hasVMT) return FALSE;
- win->m_x = event->x;
- win->m_y = event->y;
+ int x = 0;
+ int y = 0;
+ gdk_window_get_root_origin( win->m_widget->window, &x, &y );
+
+ win->m_x = x;
+ win->m_y = y;
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
mevent.SetEventObject( win );
IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow)
-wxFrame::wxFrame()
+void wxFrame::Init()
{
m_frameMenuBar = (wxMenuBar *) NULL;
m_frameStatusBar = (wxStatusBar *) NULL;
m_mainWidget = (GtkWidget*) NULL;
m_menuBarDetached = FALSE;
m_toolBarDetached = FALSE;
- m_insertCallback = (wxInsertChildFunction) NULL;
m_insertInClientArea = TRUE;
}
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
- m_frameMenuBar = (wxMenuBar *) NULL;
- m_frameStatusBar = (wxStatusBar *) NULL;
- m_frameToolBar = (wxToolBar *) NULL;
- m_sizeSet = FALSE;
- m_miniEdge = 0;
- m_miniTitle = 0;
- m_mainWidget = (GtkWidget*) NULL;
- m_menuBarDetached = FALSE;
- m_toolBarDetached = FALSE;
- m_insertCallback = (wxInsertChildFunction) NULL;
- m_insertInClientArea = TRUE;
+ Init();
+
Create( parent, id, title, pos, size, style, name );
}
void wxFrame::MakeModal( bool modal )
{
if (modal)
- {
gtk_grab_add( m_widget );
- gtk_main();
- gtk_grab_remove( m_widget );
- }
else
- {
- gtk_main_quit();
- }
+ gtk_grab_remove( m_widget );
}
void wxFrame::OnInternalIdle()