Index: src/draw.c =================================================================== --- src/draw.c (revision 37070) +++ src/draw.c (revision 37071) @@ -1005,7 +1005,7 @@ } } -void pcb_expose_preview(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *e) +void pcb_expose_preview(rnd_hid_t *hid, rnd_hid_expose_ctx_t *e) { pcb_output_t save; expose_begin(&save, hid); Index: src/draw.h =================================================================== --- src/draw.h (revision 37070) +++ src/draw.h (revision 37071) @@ -189,6 +189,6 @@ #define PCB_DRAW_TERM_GFX_WIDTH (-3) void pcb_expose_main(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *ctx, rnd_xform_t *xform_caller); -void pcb_expose_preview(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *e); +void pcb_expose_preview(rnd_hid_t *hid, rnd_hid_expose_ctx_t *e); #endif Index: src/search.c =================================================================== --- src/search.c (revision 37070) +++ src/search.c (revision 37071) @@ -1768,6 +1768,7 @@ } vtp0_t pcb_obj_list_vect; +pcb_board_t *pcb_obj_list_board; int pcb_search_screen_selector(rnd_coord_t X, rnd_coord_t Y, int Type, void **Result1, void **Result2, void **Result3) { rnd_box_t box; @@ -1784,6 +1785,7 @@ box.Y1 = Y + radius; vtp0_init(&pcb_obj_list_vect); + pcb_obj_list_board = PCB; pcb_list_block_cb(PCB, &box, (void *(*)(void *, pcb_any_obj_t *))vtp0_append, &pcb_obj_list_vect); if (pcb_obj_list_vect.used == 1) { @@ -1800,10 +1802,12 @@ } vtp0_uninit(&pcb_obj_list_vect); + pcb_obj_list_board = NULL; return PCB_OBJ_VOID; found:; vtp0_uninit(&pcb_obj_list_vect); + pcb_obj_list_board = NULL; *Result1 = obj->parent.any; *Result2 = *Result3 = obj; return obj->type; Index: src_plugins/dialogs/dlg_fontsel.c =================================================================== --- src_plugins/dialogs/dlg_fontsel.c (revision 37070) +++ src_plugins/dialogs/dlg_fontsel.c (revision 37071) @@ -72,7 +72,7 @@ memset(ctx, 0, sizeof(fontsel_ctx_t)); } -void fontsel_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +void fontsel_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { fontsel_ctx_t *ctx = prv->user_ctx; Index: src_plugins/dialogs/dlg_lib_pstk.c =================================================================== --- src_plugins/dialogs/dlg_lib_pstk.c (revision 37070) +++ src_plugins/dialogs/dlg_lib_pstk.c (revision 37071) @@ -152,7 +152,7 @@ ps->ID = -1; /* disable undo and clipping */ } -static void pstklib_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void pstklib_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { pstk_lib_ctx_t *ctx = prv->user_ctx; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); Index: src_plugins/dialogs/dlg_library.c =================================================================== --- src_plugins/dialogs/dlg_library.c (revision 37070) +++ src_plugins/dialogs/dlg_library.c (revision 37071) @@ -363,7 +363,7 @@ } -static void library_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void library_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { library_ctx_t *ctx = prv->user_ctx; int orig_po = pcb_draw_force_termlab; Index: src_plugins/dialogs/dlg_pinout.c =================================================================== --- src_plugins/dialogs/dlg_pinout.c (revision 37070) +++ src_plugins/dialogs/dlg_pinout.c (revision 37071) @@ -56,7 +56,7 @@ } -static void pinout_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void pinout_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { pinout_ctx_t *ctx = prv->user_ctx; void *r1, *r2, *r3; Index: src_plugins/dialogs/dlg_pref_layer.c =================================================================== --- src_plugins/dialogs/dlg_pref_layer.c (revision 37070) +++ src_plugins/dialogs/dlg_pref_layer.c (revision 37071) @@ -34,7 +34,7 @@ #define RND_EMPTY(a) ((a) ? (a) : "") -void layersel_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +void layersel_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { pcb_stub_draw_csect(gc, e); } Index: src_plugins/dialogs/dlg_test.c =================================================================== --- src_plugins/dialogs/dlg_test.c (revision 37070) +++ src_plugins/dialogs/dlg_test.c (revision 37071) @@ -63,7 +63,7 @@ static void cb_text_offs(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); static void cb_text_ro(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); -static void prv_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e); +static void prv_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e); static rnd_bool prv_mouse(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); static const char * test_xpm[] = { @@ -508,7 +508,7 @@ txt->hid_set_readonly(atxt, hid_ctx, ctx->txtro); } -static void prv_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void prv_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { rnd_render->set_color(gc, rnd_color_red); pcb_text_draw_string_simple(NULL, "foo", RND_MM_TO_COORD(1), RND_MM_TO_COORD(20), 5.0, 5.0, 10.0, 0, 0, 0, 0, 0); Index: src_plugins/import_ttf/ttf.c =================================================================== --- src_plugins/import_ttf/ttf.c (revision 37070) +++ src_plugins/import_ttf/ttf.c (revision 37071) @@ -404,7 +404,7 @@ memset(ctx, 0, sizeof(ttfgui_ctx_t)); /* reset all states to the initial - includes ctx->active = 0; */ } -static void ttf_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void ttf_expose(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { /* ttfgui_ctx_t *ctx = prv->user_ctx;*/ char s[17]; Index: src_plugins/propedit/propdlg.c =================================================================== --- src_plugins/propedit/propdlg.c (revision 37070) +++ src_plugins/propedit/propdlg.c (revision 37071) @@ -217,58 +217,58 @@ } } -static void (*help_expose)(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) = NULL; +static void (*help_expose)(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) = NULL; -static void help_trace_thickness(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_trace_thickness(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/thickness.c" } -static void help_trace_clearance(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_trace_clearance(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/clearance.c" } -static void help_text_scale(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_text_scale(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/text_scale.c" } -static void help_text_scale_x(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_text_scale_x(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/text_scale_x.c" } -static void help_text_scale_y(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_text_scale_y(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/text_scale_y.c" } -static void help_text_thickness(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_text_thickness(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/text_thickness.c" } -static void help_text_rotation(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_text_rotation(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/text_rot.c" } -static void help_arc_angles(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_arc_angles(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/arc_angles.c" } -static void help_arc_r(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void help_arc_r(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { # include "help/arc_r.c" } -static void prop_nil_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void prop_nil_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { } -static void prop_prv_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) +static void prop_prv_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) { if (help_expose != NULL) help_expose(attrib, prv, gc, e); @@ -369,7 +369,7 @@ rnd_hid_tree_t *tree = attrib->wdata; propdlg_t *ctx = tree->user_ctx; pcb_props_t *p = NULL; - void (*last_help)(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) = NULL; + void (*last_help)(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, rnd_hid_expose_ctx_t *e) = NULL; const char *helptxt = NULL; last_help = help_expose;