GTK 3.0:
GtkAllocation *allocation = gtk_widget_get_allocation (widget, allocation);
glViewport (0, 0, allocation->width, allocation->height);

GTK 3.0:
GdkWindow *drawable = gtk_widget_get_window (window->area);
Display *display = gdk_x11_drawable_get_xdisplay (drawable);
int id = gdk_x11_drawable_get_xid (drawable);
