std::cerr << "paint_widget pixmap = " << math_view->pixmap << std::endl;
paint_widget(GtkMathView* math_view){  g_return_if_fail(math_view != NULL);  if (!GTK_WIDGET_MAPPED(GTK_WIDGET(math_view)) || math_view->freeze_counter > 0) return;  std::cerr << "paint_widget pixmap = " << math_view->pixmap << std::endl;  GtkWidget* widget = GTK_WIDGET(math_view);    setup_adjustments(math_view);  const gint width = widget->allocation.width;  const gint height = widget->allocation.height;  Gtk_RenderingContext* rc = math_view->renderingContext;  if (math_view->pixmap == NULL)    {      math_view->pixmap = gdk_pixmap_new(widget->window, width, height, -1);      rc->setDrawable(math_view->pixmap);    }  rc->setStyle(Gtk_RenderingContext::SELECTED_STYLE);  rc->setForegroundColor(Globals::configuration.getSelectForeground());  rc->setBackgroundColor(Globals::configuration.getSelectBackground());  rc->setStyle(Gtk_RenderingContext::NORMAL_STYLE);  rc->setForegroundColor(Globals::configuration.getForeground());  rc->setBackgroundColor(Globals::configuration.getBackground());  gdk_draw_rectangle(math_view->pixmap, widget->style->white_gc, TRUE, 0, 0, width, height);  gint x = 0;  gint y = 0;  to_view_coords(math_view, &x, &y);  math_view->view->render(*rc,			  Gtk_RenderingContext::fromGtkX(x),			  Gtk_RenderingContext::fromGtkY(y));  update_widget(math_view, 0, 0, width, height);}