Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 25211) +++ trunk/src/main.c (revision 25212) @@ -699,8 +699,10 @@ if (pcb_gui != NULL) { /* init the next GUI */ pcb_gui->parse_arguments(&hid_argc, &hid_argv); - if (pcb_gui->gui) + if (pcb_gui->gui) { pcb_crosshair_init(); + pcb_tool_gui_init(); + } pcb_tool_select_by_id(&PCB->hidlib, PCB_MODE_ARROW); pcb_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); } Index: trunk/src/tool.c =================================================================== --- trunk/src/tool.c (revision 25211) +++ trunk/src/tool.c (revision 25212) @@ -188,6 +188,18 @@ return pcb_tool_select_by_id(hidlib, save_stack[--save_position]); } +void pcb_tool_gui_init(void) +{ + pcb_toolid_t n; + pcb_tool_t *tool; + + if (pcb_gui == NULL) + return; + + for(n = 0, tool = (pcb_tool_t *)pcb_tools.array; n < pcb_tools.used; n++,tool++) + pcb_gui->reg_mouse_cursor(NULL, n, tool->cursor.name, tool->cursor.pixel, tool->cursor.mask); +} + /**** current tool function wrappers ****/ #define wrap(func, err_ret, prefix, args) \ do { \ Index: trunk/src/tool.h =================================================================== --- trunk/src/tool.h (revision 25211) +++ trunk/src/tool.h (revision 25212) @@ -108,6 +108,10 @@ int pcb_tool_save(pcb_hidlib_t *hidlib); int pcb_tool_restore(pcb_hidlib_t *hidlib); +/* Called after GUI_INIT; registers all mouse cursors in the GUI */ +void pcb_tool_gui_init(void); + + /**** Tool function wrappers; calling these will operate on the current tool as defined in conf_core.editor.mode ****/