X Window System error
- From: "jams.biz" <jams biz free fr>
- To: gtkmm-list gnome org
- Subject: X Window System error
- Date: Wed, 24 Jan 2007 00:58:06 +0100
Hi,
I've made an application using gtkmm for GUI and Ogre3D to ember 3D rendering inside the GUI. Everything works fine up to gtkmm 2.8.8 (and corresponding dependency). But it crash systematically when using more recent version (for exemple current stable version gtkmm 2.10 and glibmm 2.12).
Here is message I get :
The program '********' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 229 error_code 8 request_code 152 minor_code 1)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
To embed Ogre3D into gtkmm, I derive a class from Gtk::Socket and here is a part of the code :
mGdkWindow = get_window();
if(!mGdkWindow) throw std::runtime_error("OgreWidget gdkwindow was not created in time\n");
GdkWindow* parent = mGdkWindow->gobj();
GdkDisplay* display = gdk_drawable_get_display(GDK_DRAWABLE(parent));
GdkScreen* screen = gdk_drawable_get_screen(GDK_DRAWABLE(parent));
Display* xdisplay = GDK_DISPLAY_XDISPLAY(display);
Screen* xscreen = GDK_SCREEN_XSCREEN(screen);
int screen_number = XScreenNumberOfScreen(xscreen);
// XID xid_parent = (XID)get_id();
XID xid_parent = GDK_WINDOW_XWINDOW(parent);
And here is the string I give to Ogre to create its rendering window :
sprintf(Xembed, "%d:%d:%d", xdisplay, screen_number, xid_parent);
Any help would be really appriciated !
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]