From 426be0e68c6d23df4e43bcb562025084b7ed6efe Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 22 Sep 2023 18:33:16 +0200 Subject: [PATCH] add !defined(__unix__) in all #if defined(FIX_BROKEN_TILED_FILL) --- src/actions.c | 5 +---- src/callback.c | 2 +- src/move.c | 2 +- src/xinit.c | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/actions.c b/src/actions.c index 42bea9b4..54e4ae3b 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3376,19 +3376,16 @@ void select_rect(int what, int select) { RECTORDER(xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2); - - #if defined(FIX_BROKEN_TILED_FILL) + #if defined(FIX_BROKEN_TILED_FILL) || !defined(__unix__) 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); - bbox(START,0.0, 0.0, 0.0, 0.0); bbox(ADD, xctx->nl_xr, xctx->nl_yr, xctx->nl_xr2, xctx->nl_yr2); bbox(SET,0.0, 0.0, 0.0, 0.0); diff --git a/src/callback.c b/src/callback.c index 078edc2f..131a18e3 100644 --- a/src/callback.c +++ b/src/callback.c @@ -993,7 +993,7 @@ void draw_crosshair(int del) xctx->draw_pixmap = 0; xctx->draw_window = 1; - #if defined(FIX_BROKEN_TILED_FILL) + #if defined(FIX_BROKEN_TILED_FILL) || !defined(__unix__) if(!bbox_set) { bbox(START,0.0, 0.0, 0.0, 0.0); bbox(ADD, X_TO_XSCHEM(xctx->areax1), xctx->prev_crossy - xctx->lw, diff --git a/src/move.c b/src/move.c index 9e883783..d5b38165 100644 --- a/src/move.c +++ b/src/move.c @@ -194,7 +194,7 @@ void draw_selection(GC g, int interruptable) #endif if(g != xctx->gctiled) xctx->movelastsel = xctx->lastsel; - #if defined(FIX_BROKEN_TILED_FILL) + #if defined(FIX_BROKEN_TILED_FILL) || !defined(__unix__) else { 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); diff --git a/src/xinit.c b/src/xinit.c index 17e3147c..bb3d7ac9 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -2095,7 +2095,7 @@ 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) + #if defined(FIX_BROKEN_TILED_FILL) || !defined(__unix__) XGCValues gcv; unsigned long gcvm; #endif @@ -2108,7 +2108,7 @@ void resetwin(int create_pixmap, int clear_pixmap, int force, int w, int h) xctx->xrect[0].width, xctx->xrect[0].height, screendepth); #endif - #if defined(FIX_BROKEN_TILED_FILL) + #if defined(FIX_BROKEN_TILED_FILL) || !defined(__unix__) gcv.function = GXnoop; /* disable all graphic operations with gctiled */ gcvm = GCFunction; xctx->gctiled = XCreateGC(display,xctx->window, gcvm, &gcv); /* noop for gctiled */