shithub: riscv

Download patch

ref: 5075dd35335981e0d79af16f9482c87fc6615f68
parent: eec5314f911db5b02898f7cf74256e9018e38071
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Fri Sep 16 06:46:31 EDT 2011

page: grey background

--- a/sys/src/cmd/page.c
+++ b/sys/src/cmd/page.c
@@ -36,6 +36,7 @@
 Page *root, *current;
 QLock pagelock;
 int nullfd;
+Image *background;
 
 char pagespool[] = "/tmp/pagespool.";
 
@@ -894,7 +895,7 @@
 		r = rectaddpt(Rpt(ZP, pagesize(p)), addpt(pos, screen->r.min));
 		zoomdraw(screen, r, ZR, i, i->r.min, zoom);
 	}
-	gendrawdiff(screen, screen->r, r, display->white, ZP, nil, ZP, S);
+	gendrawdiff(screen, screen->r, r, background, ZP, nil, ZP, S);
 	border(screen, r, -Borderwidth, display->black, ZP);
 	flushimage(display, 1);
 }
@@ -915,7 +916,7 @@
 	rectclip(&or, screen->r);
 	draw(screen, rectaddpt(or, d), screen, nil, or.min);
 	zoomdraw(screen, nr, rectaddpt(or, d), i, i->r.min, zoom);
-	gendrawdiff(screen, screen->r, nr, display->white, ZP, nil, ZP, S);
+	gendrawdiff(screen, screen->r, nr, background, ZP, nil, ZP, S);
 	border(screen, nr, -Borderwidth, display->black, ZP);
 	flushimage(display, 1);
 }
@@ -1118,6 +1119,9 @@
 		free(s);
 	}
 	initdraw(drawerr, nil, argv0);
+	background = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x777777FF);
+	draw(screen, screen->r, background, nil, ZP);
+	flushimage(display, 1);
 	display->locking = 1;
 	unlockdisplay(display);
 	einit(Ekeyboard|Emouse);