- Code: Select all
MyFrame(wxWindow* parent) : wxFrame(parent, -1, _("wxAUI Test"),
wxDefaultPosition, wxSize(800,600),
wxDEFAULT_FRAME_STYLE)
{
m_mgr.SetFrame(this);
TestGLCanvas* canvas = new TestGLCanvas( this );
wxTextCtrl* text2 = new wxTextCtrl(this, -1, _("Pane 2 - sample text"),
wxDefaultPosition, wxSize(200,150),
wxNO_BORDER | wxTE_MULTILINE);
wxTextCtrl* text3 = new wxTextCtrl(this, -1, _("Main content window"),
wxDefaultPosition, wxSize(200,150),
wxNO_BORDER | wxTE_MULTILINE);
// add the panes to the manager
m_mgr.AddPane( canvas, wxLEFT, wxT( "OpenGL" ) );
m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Number Two"));
m_mgr.AddPane(text3, wxCENTER);
m_mgr.Update();
}
when I run the app I get an X server error as soon as I undock the OpenGL pane:
(FMTestApp:15587): Gdk-WARNING **: gdkdrawable-x11.c:912 drawable is not a pixmap or window
The program 'FMTestApp' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 1348 error_code 8 request_code 143 minor_code 5)
Similar results happen when starting with an undocked pane and I try to dock it.
This works fine under MSW, btw.
Environment: gcc 3.4.5, wxAUI 0.9.2, GTK 2.4.13, Red Hat
I don't have the debug version of X installed, so I can't put a breakpoint at gdk_x_error(), but using the '--g-fatal-warnings' command line option, I'm able to get a stack trace to the code that's generating the gdk warning. Here's the germane part of it:
- Code: Select all
#1 0x00bef7f5 in raise () from /lib/tls/libc.so.6
#2 0x00bf1199 in abort () from /lib/tls/libc.so.6
#3 0x04310ebe in g_logv () from /usr/lib/libglib-2.0.so.0
#4 0x04310ef0 in g_log () from /usr/lib/libglib-2.0.so.0
#5 0x00694a79 in gdk_x11_drawable_get_xid () from /usr/lib/libgdk-x11-2.0.so.0
#6 0x002f25d1 in wxGLContext::SetCurrent (this=0x8658790)
at ../src/gtk/glcanvas.cpp:166
#7 0x002f3e60 in wxGLCanvas::SetCurrent (this=0x8632768)
at ../src/gtk/glcanvas.cpp:657
#8 0x08073572 in TestGLCanvas::OnSize (this=0x8632768, event=@0xbff0c1c0)
at ../src/testoglcanvas.cpp:286
#9 0x003cf309 in wxAppConsole::HandleEvent (this=0x85c37d8,
handler=0x8632768, func=
{__pfn = 0x8073536 <TestGLCanvas::OnSize(wxSizeEvent&)>, __delta = 0},
event=@0xbff0c1c0) at ../src/common/appbase.cpp:324
#10 0x00481639 in wxEvtHandler::ProcessEventIfMatches (entry=@0x807d6e0,
handler=0x8632768, event=@0xbff0c1c0) at ../src/common/event.cpp:1193
#11 0x00480580 in wxEventHashTable::HandleEvent (this=0x807d6c8,
event=@0xbff0c1c0, self=0x8632768) at ../src/common/event.cpp:875
#12 0x0048184d in wxEvtHandler::ProcessEvent (this=0x8632768,
event=@0xbff0c1c0) at ../src/common/event.cpp:1255
#13 0x002f2a28 in gtk_glcanvas_size_callback (alloc=0xbff0c720, win=0x8632768)
at ../src/gtk/glcanvas.cpp:294
#14 0x00943acd in g_cclosure_marshal_VOID__BOXED ()
from /usr/lib/libgobject-2.0.so.0
#15 0x0092b347 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0x0094094e in g_signal_has_handler_pending ()
from /usr/lib/libgobject-2.0.so.0
#17 0x009429bc in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#18 0x00942c5a in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#19 0x040654f6 in gtk_widget_size_allocate () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x010c0087 in gtk_pizza_allocate_child (pizza=0x862f430, child=0x8638470)
at ../src/gtk/win_gtk.c:971
#21 0x010bf867 in gtk_pizza_size_allocate (widget=0x862f430,
allocation=0xbff0cd20) at ../src/gtk/win_gtk.c:768
#22 0x00943acd in g_cclosure_marshal_VOID__BOXED ()
from /usr/lib/libgobject-2.0.so.0
#23 0x0092b6b2 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#24 0x0092b347 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#25 0x00940616 in g_signal_has_handler_pending ()
from /usr/lib/libgobject-2.0.so.0
#26 0x009429bc in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#27 0x00942c5a in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
..and so forth and so on...
Any ideas on how to fix this problem? Does wxAUI support wxGLCanvas under GTK?