RE: [GtkGLExt] Window size issue
- From: Shawn Bakhtiar <shashaness hotmail com>
- To: <gtkglext-list gnome org>, <gtk-app-devel-list gnome org>
- Subject: RE: [GtkGLExt] Window size issue
- Date: Sat, 30 Jan 2010 18:59:00 -0500
I know someone brought this up before. I don't recall if there was a resolution to it or not.
I have successfully patched and compiled the latest from the GtkGLExt git repo and running on OS X Snow
Leopard (10.6), although I am use the 10.5 building to the 368 architecture.
However, any application (including the examples), that uses the library, takes over the entire window,
overlapping all other widgets.
Any ideas how I should trace this down?
The code is straight out of the example (which does the same thing), gtk_gl_init() has already been called in
main, and the container is main_hbox, which then has other widgets added to it later in the code.
glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB |
GDK_GL_MODE_DEPTH |
GDK_GL_MODE_DOUBLE);
if(glconfig != NULL){
GtkWidget * drawing_area = gtk_drawing_area_new ();
gtk_widget_set_size_request (drawing_area, 200, 200);
/* Set OpenGL-capability to the widget. */
gtk_widget_set_gl_capability (drawing_area,
glconfig,
NULL,
TRUE,
GDK_GL_RGBA_TYPE);
gtk_widget_add_events (drawing_area,
GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON2_MOTION_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_VISIBILITY_NOTIFY_MASK);
g_signal_connect_after (G_OBJECT (drawing_area), "realize",
G_CALLBACK (realize), NULL);
g_signal_connect (G_OBJECT (drawing_area), "configure_event",
G_CALLBACK (configure_event), NULL);
g_signal_connect (G_OBJECT (drawing_area), "expose_event",
G_CALLBACK (expose_event), NULL);
g_signal_connect (G_OBJECT (drawing_area), "button_press_event",
G_CALLBACK (button_press_event), NULL);
g_signal_connect (G_OBJECT (drawing_area), "motion_notify_event",
G_CALLBACK (motion_notify_event), NULL);
g_signal_connect (G_OBJECT (drawing_area), "map_event",
G_CALLBACK (map_event), NULL);
g_signal_connect (G_OBJECT (drawing_area), "unmap_event",
G_CALLBACK (unmap_event), NULL);
g_signal_connect (G_OBJECT (drawing_area), "visibility_notify_event",
G_CALLBACK (visibility_notify_event), NULL);
g_signal_connect_swapped (G_OBJECT (main_window), "key_press_event",
G_CALLBACK (key_press_event), drawing_area);
gtk_box_pack_start (GTK_BOX (main_hbox), drawing_area, TRUE, TRUE, 0);
gtk_widget_show (drawing_area);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]