X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/828f655fd31ac19d83cf7ec14d0b207e9b254977..d9f39e09e82e99c422619f4e3df536d0a9e87987:/utils/glcanvas/gtk/glcanvas.cpp diff --git a/utils/glcanvas/gtk/glcanvas.cpp b/utils/glcanvas/gtk/glcanvas.cpp index 3ee6ca77c0..74b442c096 100644 --- a/utils/glcanvas/gtk/glcanvas.cpp +++ b/utils/glcanvas/gtk/glcanvas.cpp @@ -214,6 +214,8 @@ bool wxGLCanvas::Create( wxWindow *parent, wxWindowID id, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK ); + GTK_WIDGET_SET_FLAGS( m_glWidget, GTK_CAN_FOCUS ); + gtk_widget_pop_visual(); gtk_widget_pop_colormap(); @@ -276,7 +278,7 @@ void wxGLCanvas::SetColour( const char *colour ) if (m_glContext) m_glContext->SetColour( colour ); } -void wxGLCanvas::SetSize( int x, int y, int width, int height, int sizeFlags ) +void wxGLCanvas::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { if (m_resizing) return; // I don't like recursions m_resizing = TRUE; @@ -324,8 +326,7 @@ void wxGLCanvas::SetSize( int x, int y, int width, int height, int sizeFlags ) if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth; if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight; - wxPoint pt( m_parent->GetClientAreaOrigin() ); - gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x, m_y+pt.y ); + gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x, m_y ); if ((old_width != m_width) || (old_height != m_height)) { @@ -351,11 +352,6 @@ void wxGLCanvas::SetSize( int x, int y, int width, int height, int sizeFlags ) m_resizing = FALSE; } -void wxGLCanvas::SetSize( int width, int height ) -{ - SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING ); -} - GtkWidget *wxGLCanvas::GetConnectWidget() { return m_glWidget;