diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index e22c3f135a3..7b6fa2aa42a 100755 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -690,7 +690,7 @@ setWindowCustomCursorShape( if(XAllocNamedColor(m_display, DefaultColormap(m_display, DefaultScreen(m_display)), "White", &fg, &fg) == 0) return GHOST_kFailure; if(XAllocNamedColor(m_display, DefaultColormap(m_display, DefaultScreen(m_display)), - "Red", &bg, &bg) == 0) return GHOST_kFailure; + "Black", &bg, &bg) == 0) return GHOST_kFailure; if (m_custom_cursor) { XFreeCursor(m_display, m_custom_cursor); diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 0e6e661dddc..915fa0f1fac 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -102,6 +102,9 @@ #include "nla.h" /* For __NLA : Important - Do not remove! */ #include "render.h" +#include "GHOST_C-api.h" +#include "winlay.h" + /****/ static void free_editverts(ListBase *edve); @@ -7223,20 +7226,25 @@ CutCurve *get_mouse_trail(int *len, char mode){ persp(PERSP_WIN); + glColor3ub(200, 200, 0); + event=extern_qread(&val); while((event != RETKEY ) && (event != PADENTER ) && (event != RIGHTMOUSE) ){ event=extern_qread(&val); /* Enter or RMB indicates finish */ if (event==ESCKEY){ - for(j=1;j1)&&(i!=lasti)) { /*Draw recorded part of curve */ - sdrawXORline(curve[i-2].x, curve[i-2].y, curve[i-1].x, curve[i-1].y); + sdrawline(curve[i-2].x, curve[i-2].y, curve[i-1].x, curve[i-1].y); glFinish(); } if ((i==lasti)&&(i>0)) { /*Draw rubberband */ + glLineWidth(2.0); sdrawXORline(curve[i-1].x, curve[i-1].y,mval[0], mval[1]); + glLineWidth(1.0); glFinish(); rubberband=1; } @@ -7304,9 +7314,6 @@ CutCurve *get_mouse_trail(int *len, char mode){ MEM_freeN(temp); } } - for(j=1;jghostwin, mask, bitmap, 0, 15); curve=get_mouse_trail(&len, TRAIL_MIXED); @@ -7381,7 +7405,7 @@ void KnifeSubdivide(char mode){ /* Return to old cursor and flags...*/ addqueue(curarea->win, REDRAW, 0); - set_cursor(oldcursor); + window_set_cursor(win, oldcursor); if (curve) MEM_freeN(curve); } @@ -7636,32 +7660,19 @@ void undo_menu_mesh(void) { short event=66; int i, lasti; - char menu[2080]; + char menu[2080], temp[64]; TEST_EDITMESH - lasti= (G.undo_edit_level>30) ? G.undo_edit_level-30 : 0; - - strcpy(menu, "UNDO %t"); - strcat(menu, "|%l|All changes%x1|%l"); - - for (i=G.undo_edit_level; i>=lasti; i--) { - sprintf(menu+strlen(menu), "|%s%%x%d", G.undo_edit[i].name, i+2); + strcpy(menu, "UNDO %t|%l"); + strcat(menu, "|All changes%x1|%l"); + + for (i=G.undo_edit_level; i>=0; i--) { + snprintf(temp, 64, "|%s%%x%d", G.undo_edit[i].name, i+2); + strcat(menu, temp); } - if (lasti) strcat(menu, "|%l|More...%x33|%l"); - - event= pupmenu(menu); - - if (event==33){ /* More options.*/ - strcpy(menu, "UNDO %t"); - strcat(menu, "|%l|All changes%x1|%l"); - - for (i=lasti; i>=0; i--) { - sprintf(menu+strlen(menu), "|%s%%x%d", G.undo_edit[i].name, i+2); - } - event= pupmenu(menu); - } + event=pupmenu_col(menu, 20); if(event<1) return;