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 659:6b1dff1575b3
prev658:f5926310bfbe
next668:c62dff190859
author nkeynes
date Wed Apr 16 22:54:40 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Move drawable creation to video_gtk.c - removes the last platform dependency from gtkui
file annotate diff log raw
1.1 --- a/src/gtkui/main_win.c Wed Apr 16 12:43:52 2008 +0000
1.2 +++ b/src/gtkui/main_win.c Wed Apr 16 22:54:40 2008 +0000
1.3 @@ -33,11 +33,6 @@
1.4 #include "lxdream.h"
1.5 #include "gtkui/gtkui.h"
1.6
1.7 -#ifdef HAVE_GLX
1.8 -#include <gdk/gdkx.h>
1.9 -#include "drivers/video_glx.h"
1.10 -#endif
1.11 -
1.12
1.13 struct main_window_info {
1.14 GtkWidget *window;
1.15 @@ -250,26 +245,7 @@
1.16
1.17 gtk_toolbar_set_style( GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS );
1.18
1.19 - win->video = gtk_drawing_area_new();
1.20 -
1.21 -#ifdef HAVE_GLX
1.22 - Display *display = gdk_x11_display_get_xdisplay( gtk_widget_get_display(win->window));
1.23 - Screen *screen = gdk_x11_screen_get_xscreen( gtk_widget_get_screen(win->window));
1.24 - int screen_no = XScreenNumberOfScreen(screen);
1.25 - if( !video_glx_init(display, screen_no) ) {
1.26 - ERROR( "Unable to initialize GLX, aborting" );
1.27 - exit(3);
1.28 - }
1.29 -
1.30 - XVisualInfo *visual = video_gtk_get_visual();
1.31 - if( visual != NULL ) {
1.32 - GdkVisual *gdkvis = gdk_x11_screen_lookup_visual( gtk_widget_get_screen(win->window), visual->visualid );
1.33 - GdkColormap *colormap = gdk_colormap_new( gdkvis, FALSE );
1.34 - gtk_widget_set_colormap( win->video, colormap );
1.35 - }
1.36 -#endif
1.37 -
1.38 - GTK_WIDGET_SET_FLAGS(win->video, GTK_CAN_FOCUS|GTK_CAN_DEFAULT);
1.39 + win->video = video_gtk_create_drawable();
1.40 gtk_widget_set_size_request( win->video, 640, 480 );
1.41 gtk_widget_set_double_buffered( win->video, FALSE );
1.42 frame = gtk_frame_new(NULL);
.