if FIX_BROKEN_TILED_FILL is defined disable all graphic operations with gctiled GC (set function to GXnoop) - Also clear selection rectangle with MyXCopyArea in select_rect()
This commit is contained in:
parent
fbe3064cf2
commit
4ea2ccac4c
|
|
@ -3375,7 +3375,16 @@ void select_rect(int what, int select)
|
|||
else if(what & END)
|
||||
{
|
||||
RECTORDER(xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2);
|
||||
|
||||
|
||||
#if defined(FIX_BROKEN_TILED_FILL)
|
||||
MyXCopyArea(display, xctx->save_pixmap, xctx->window, xctx->gc[0], xctx->xrect[0].x, xctx->xrect[0].y,
|
||||
xctx->xrect[0].width, xctx->xrect[0].height, xctx->xrect[0].x, xctx->xrect[0].y);
|
||||
#else
|
||||
drawtemprect(xctx->gctiled, NOW, xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2);
|
||||
#endif
|
||||
|
||||
|
||||
/* draw_selection(xctx->gc[SELLAYER], 0); */
|
||||
select_inside(xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2, xctx->nl_sel);
|
||||
|
||||
|
|
|
|||
14
src/xinit.c
14
src/xinit.c
|
|
@ -2094,6 +2094,11 @@ void resetwin(int create_pixmap, int clear_pixmap, int force, int w, int h)
|
|||
XFreeGC(display,xctx->gctiled);
|
||||
}
|
||||
if(create_pixmap) {
|
||||
#if defined(FIX_BROKEN_TILED_FILL)
|
||||
XGCValues gcv;
|
||||
unsigned long gcvm;
|
||||
#endif
|
||||
|
||||
#ifdef __unix__
|
||||
xctx->save_pixmap = XCreatePixmap(display, xctx->window,
|
||||
xctx->xrect[0].width, xctx->xrect[0].height, screendepth);
|
||||
|
|
@ -2101,9 +2106,18 @@ void resetwin(int create_pixmap, int clear_pixmap, int force, int w, int h)
|
|||
xctx->save_pixmap = Tk_GetPixmap(display, xctx->window,
|
||||
xctx->xrect[0].width, xctx->xrect[0].height, screendepth);
|
||||
#endif
|
||||
|
||||
#if defined(FIX_BROKEN_TILED_FILL)
|
||||
gcv.function = GXnoop; /* disable all graphic operations with gctiled */
|
||||
gcvm = GCFunction;
|
||||
xctx->gctiled = XCreateGC(display,xctx->window, gcvm, &gcv); /* noop for gctiled */
|
||||
XSetFillStyle(display,xctx->gctiled,FillSolid);
|
||||
#else
|
||||
xctx->gctiled = XCreateGC(display,xctx->window,0L, NULL);
|
||||
XSetTile(display,xctx->gctiled, xctx->save_pixmap);
|
||||
XSetFillStyle(display,xctx->gctiled,FillTiled);
|
||||
#endif
|
||||
|
||||
/* whenever a pixmap is recreated all GC attributes must be reissued */
|
||||
resetcairo(1, 0, 1); /* create, clear, force */
|
||||
/* change_linewidth(-1.0); */
|
||||
|
|
|
|||
Loading…
Reference in New Issue