rem: if (screen.load_file_popup && screen.load_file_popup->window) gdk_window_raise(screen.load_file_popup->window); if (screen.color_selection_popup && screen.color_selection_popup->window) gdk_window_raise(screen.color_selection_popup->window); if (screen.export_png_popup && screen.export_png_popup->window) gdk_window_raise(screen.export_png_popup->window); if (screen.scale_popup && screen.scale_popup->window) gdk_window_raise(screen.scale_popup->window);
add: if (screen.win.load_file && screen.win.load_file->window) gdk_window_raise(screen.win.load_file->window); if (screen.win.color_selection && screen.win.color_selection->window) gdk_window_raise(screen.win.color_selection->window); if (screen.win.export_png && screen.win.export_png->window) gdk_window_raise(screen.win.export_png->window); if (screen.win.scale && screen.win.scale->window) gdk_window_raise(screen.win.scale->window);
context: expose_event (GtkWidget *widget, GdkEventExpose *event){    GdkPixmap *new_pixmap;    GdkGC *gc = gdk_gc_new(widget->window);    /*     * Create a pixmap with default background     */    new_pixmap = gdk_pixmap_new(widget->window,				widget->allocation.width,				widget->allocation.height,				-1);    gdk_gc_set_foreground(gc, screen.background);    gdk_draw_rectangle(new_pixmap, gc, TRUE, 		       event->area.x, event->area.y,		       event->area.width, event->area.height);        /*     * Copy gerber pixmap onto background if we have one to copy.     * Do translation at the same time.     */    if (screen.pixmap != NULL) {	gdk_draw_pixmap(new_pixmap,			widget->style->fg_gc[GTK_WIDGET_STATE (widget)],			screen.pixmap, 			event->area.x + screen.off_x, 			event->area.y + screen.off_y, 			event->area.x, event->area.y,			event->area.width, event->area.height);    }    /*     * Draw the whole thing onto screen     */    gdk_draw_pixmap(widget->window,		    widget->style->fg_gc[GTK_WIDGET_STATE (widget)],		    new_pixmap,		    event->area.x, event->area.y,		    event->area.x, event->area.y,		    event->area.width, event->area.height);#ifdef GERBV_DEBUG_OUTLINE    {	    double dx, dy;	    dx = screen.gerber_bbox.x2-screen.gerber_bbox.x1;	    dy = screen.gerber_bbox.y2-screen.gerber_bbox.y1;	    gdk_gc_set_foreground(gc, screen.dist_measure_color);	    gdk_draw_rectangle(widget->window, gc, FALSE, 			       (screen.gerber_bbox.x1-1.1)*screen.scale - screen.trans_x,			       ((screen.gerber_bbox.y1-0.6)*screen.scale - screen.trans_y),			       dx*screen.scale,			       dy*screen.scale);    }#endif /* DEBUG_GERBV_OUTLINE */    gdk_pixmap_unref(new_pixmap);    gdk_gc_unref(gc);    /*     * Draw Zooming outline if we are in that mode     */    if (screen.state == ZOOM_OUTLINE) {	draw_zoom_outline(screen.centered_outline_zoom);    } else if (screen.state == MEASURE) {	draw_measure_distance();    }    /*     * Raise popup windows if they happen to disappear     */    if (screen.load_file_popup && screen.load_file_popup->window)	gdk_window_raise(screen.load_file_popup->window);    if (screen.color_selection_popup && screen.color_selection_popup->window)	gdk_window_raise(screen.color_selection_popup->window);    if (screen.export_png_popup && screen.export_png_popup->window)	gdk_window_raise(screen.export_png_popup->window);    if (screen.scale_popup && screen.scale_popup->window)	gdk_window_raise(screen.scale_popup->window);    return FALSE;} /* expose_event */