Search
lxdream.org :: lxdream/src/gtkui/main_win.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gtkui/main_win.c
changeset 635:76c63aac3590
prev618:3ade50e8603c
next658:f5926310bfbe
author nkeynes
date Fri Mar 28 12:32:25 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Merge lxdream-render branch (643:670) to trunk
file annotate diff log raw
1.1 --- a/src/gtkui/main_win.c Wed Jan 30 02:39:57 2008 +0000
1.2 +++ b/src/gtkui/main_win.c Fri Mar 28 12:32:25 2008 +0000
1.3 @@ -250,16 +250,21 @@
1.4 Display *display = gdk_x11_display_get_xdisplay( gtk_widget_get_display(win->window));
1.5 Screen *screen = gdk_x11_screen_get_xscreen( gtk_widget_get_screen(win->window));
1.6 int screen_no = XScreenNumberOfScreen(screen);
1.7 +#ifndef HAVE_LIBOSMESA
1.8 if( !video_glx_init(display, screen_no) ) {
1.9 ERROR( "Unable to initialize GLX, aborting" );
1.10 exit(3);
1.11 }
1.12 +#endif
1.13
1.14 - XVisualInfo *visual = video_glx_get_visual();
1.15 - GdkVisual *gdkvis = gdk_x11_screen_lookup_visual( gtk_widget_get_screen(win->window), visual->visualid );
1.16 - GdkColormap *colormap = gdk_colormap_new( gdkvis, FALSE );
1.17 win->video = gtk_drawing_area_new();
1.18 - gtk_widget_set_colormap( win->video, colormap );
1.19 +
1.20 + XVisualInfo *visual = video_gtk_get_visual();
1.21 + if( visual != NULL ) {
1.22 + GdkVisual *gdkvis = gdk_x11_screen_lookup_visual( gtk_widget_get_screen(win->window), visual->visualid );
1.23 + GdkColormap *colormap = gdk_colormap_new( gdkvis, FALSE );
1.24 + gtk_widget_set_colormap( win->video, colormap );
1.25 + }
1.26 GTK_WIDGET_SET_FLAGS(win->video, GTK_CAN_FOCUS|GTK_CAN_DEFAULT);
1.27 gtk_widget_set_size_request( win->video, 640, 480 );
1.28 gtk_widget_set_double_buffered( win->video, FALSE );
.