draw_temp_symbol(): update symbol bbox before doing XCopyArea (fix_broken_tiled_fill && gctiled)

This commit is contained in:
stefan schippers 2023-10-31 13:10:16 +01:00
parent 79a4771a71
commit ff24678fec
2 changed files with 12 additions and 2 deletions

View File

@ -775,6 +775,7 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot
xctx->inst[n].xx2 + xoffset, xctx->inst[n].yy2 + yoffset);
}
if(fix_broken) { /* do a copyArea on first layer only. Faster. */
symbol_bbox(n, &xctx->inst[n].x1, &xctx->inst[n].y1, &xctx->inst[n].x2, &xctx->inst[n].y2);
MyXCopyAreaDouble(display, xctx->save_pixmap, xctx->window, xctx->gc[0],
xctx->inst[n].x1 + xoffset, xctx->inst[n].y1 + yoffset,
xctx->inst[n].x2 + xoffset, xctx->inst[n].y2 + yoffset,

View File

@ -71,6 +71,10 @@ static void child_handler(int signum)
int main(int argc, char **argv)
{
int i;
#ifdef __unix__
int stdin_is_a_fifo = 0;
struct stat statbuf;
#endif
Display *display;
signal(SIGINT, sig_handler);
signal(SIGSEGV, sig_handler);
@ -97,8 +101,13 @@ int main(int argc, char **argv)
argc = process_options(argc, argv);
#ifdef __unix__
/* if invoked in background detach from console */
if(getpgrp() != tcgetpgrp(STDOUT_FILENO) && !cli_opt_no_readline) {
/* if invoked in background (and not invoked from a command pipeline) detach from console */
if(!fstat(0, &statbuf)) {
if(statbuf.st_mode & S_IFIFO) stdin_is_a_fifo = 1; /* input coming from a command pipe */
}
if(!stdin_is_a_fifo && getpgrp() != tcgetpgrp(STDOUT_FILENO) && !cli_opt_no_readline) {
cli_opt_detach = 1;
}
#endif