Index: src/af/gr/unix/gr_UnixGraphics.cpp =================================================================== RCS file: /cvsroot/abi/src/af/gr/unix/gr_UnixGraphics.cpp,v retrieving revision 1.151 diff -u -r1.151 gr_UnixGraphics.cpp --- src/af/gr/unix/gr_UnixGraphics.cpp 30 Aug 2002 15:58:47 -0000 1.151 +++ src/af/gr/unix/gr_UnixGraphics.cpp 1 Sep 2002 19:39:41 -0000 @@ -369,6 +369,8 @@ UT_sint32 curWidth; const UT_UCSChar *pC; + GR_CaretDisabler caretDisabler(getCaret()); + for(pC=pChars+iCharOffset, x=xoff; pCleft, pRect->top, pRect->width, pRect->height); } @@ -1160,6 +1170,7 @@ void GR_UnixGraphics::fillRect(const UT_RGBColor& c, UT_sint32 x, UT_sint32 y, UT_sint32 w, UT_sint32 h) { + GR_CaretDisabler caretDisabler(getCaret()); // save away the current color, and restore it after we fill the rect GdkGCValues gcValues; GdkColor oColor; @@ -1181,13 +1192,17 @@ gdk_gc_set_foreground(m_pGC, &nColor); - gdk_draw_rectangle(m_pWin, m_pGC, 1, x, y, w, h); +// This seems to clear up some problems, but it may not be right. +// gdk_draw_rectangle(m_pWin, m_pGC, 1, x, y, w+1, h+1); + gdk_draw_rectangle(m_pWin, m_pGC, 1, x, y, w, h); gdk_gc_set_foreground(m_pGC, &oColor); } void GR_UnixGraphics::scroll(UT_sint32 dx, UT_sint32 dy) { + GR_CaretDisabler caretDisabler(getCaret()); + UT_sint32 winWidth, winHeight; gdk_drawable_get_size ( GDK_DRAWABLE(m_pWin), &winWidth, &winHeight ) ; UT_Rect exposeArea; @@ -1287,6 +1302,7 @@ UT_sint32 x_src, UT_sint32 y_src, UT_sint32 width, UT_sint32 height) { + GR_CaretDisabler caretDisabler(getCaret()); gdk_window_copy_area(m_pWin, m_pGC, x_dest, y_dest, m_pWin, x_src, y_src, width, height); } @@ -1294,6 +1310,7 @@ void GR_UnixGraphics::clearArea(UT_sint32 x, UT_sint32 y, UT_sint32 width, UT_sint32 height) { + GR_CaretDisabler caretDisabler(getCaret()); // UT_DEBUGMSG(("ClearArea: %d %d %d %d\n", x, y, width, height)); if (width > 0) { @@ -1344,7 +1361,6 @@ { GR_Image* pImg = NULL; - pImg = new GR_UnixImage(pszName,false); pImg->convertFromBuffer(pBB, iDisplayWidth, iDisplayHeight); return pImg; @@ -1358,6 +1374,7 @@ void GR_UnixGraphics::drawImage(GR_Image* pImg, UT_sint32 xDest, UT_sint32 yDest) { + GR_CaretDisabler caretDisabler(getCaret()); UT_ASSERT(pImg); GR_UnixImage * pUnixImage = static_cast(pImg); @@ -1525,6 +1542,7 @@ void GR_UnixGraphics::fillRect(GR_Color3D c, UT_sint32 x, UT_sint32 y, UT_sint32 w, UT_sint32 h) { + GR_CaretDisabler caretDisabler(getCaret()); UT_ASSERT(c < COUNT_3D_COLORS); gdk_gc_set_foreground(m_pGC, &m_3dColors[c]); gdk_draw_rectangle(m_pWin, m_pGC, 1, x, y, w, h); @@ -1538,5 +1556,6 @@ void GR_UnixGraphics::polygon(UT_RGBColor& c,UT_Point *pts,UT_uint32 nPoints) { + GR_CaretDisabler caretDisabler(getCaret()); // save away the current color, and restore it after we draw the polygon GdkGCValues gcValues; GdkColor oColor;