X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c25ccf85c185b341b9308357fb105b9a35d51574..dfc3d7e025e919d9cf0d2e59d3c74bfab0b07e55:/src/gtk/frame.cpp diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index 829a2cdf74..258bf92514 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -146,15 +146,19 @@ static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSE // "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 ); @@ -304,7 +308,7 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow) -wxFrame::wxFrame() +void wxFrame::Init() { m_frameMenuBar = (wxMenuBar *) NULL; m_frameStatusBar = (wxStatusBar *) NULL; @@ -315,7 +319,6 @@ wxFrame::wxFrame() m_mainWidget = (GtkWidget*) NULL; m_menuBarDetached = FALSE; m_toolBarDetached = FALSE; - m_insertCallback = (wxInsertChildFunction) NULL; m_insertInClientArea = TRUE; } @@ -323,17 +326,8 @@ wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, 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 ); }