shithub: patch

Download patch

ref: 3f7afb296664f40fd56a48a35321b7c62def5757
parent: 507ddf3a5cb60f52a8bc2b8e013fd333d75208a4
author: qwx <qwx@sciops.net>
date: Sun Mar 6 06:10:55 EST 2022

promote rio to fork

--- a/rio-col
+++ /dev/null
@@ -1,47 +1,0 @@
---- a/sys/src/cmd/rio/data.c
-+++ b/sys/src/cmd/rio/data.c
-@@ -175,30 +175,20 @@
- void
- iconinit(void)
- {
--	background = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x777777FF);
-+	background = display->black;
- 
- 	/* greys are multiples of 0x11111100+0xFF, 14* being palest */
--	cols[BACK] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xFFFFFFFF^reverse);
--	cols[BORD] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x999999FF^reverse);
--	cols[TEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x000000FF^reverse);
--	cols[HTEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x000000FF);
--	if(!reverse) {
--		cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xCCCCCCFF);
--		titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DGreygreen);
--		lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPalegreygreen);
--	} else {
--		cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPurpleblue);
--		titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPurpleblue);
--		lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x222222FF);
--	}
--	dholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DMedblue);
--	lightholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DGreyblue);
--	paleholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPalegreyblue);
--	paletextcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x666666FF^reverse);
--	sizecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DRed);
--
--	if(reverse == 0)
--		holdcol = dholdcol;
--	else
--		holdcol = paleholdcol;
-+	cols[BACK] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DBlack);
-+	cols[BORD] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x111111FF);
-+	cols[TEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x884400FF);
-+	cols[HTEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x884400FF);
-+	cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x440000FF);
-+	titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x440000FF);
-+	lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x111111FF);
-+	dholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x666666FF);
-+	lightholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x222222FF);
-+	paleholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x333333FF);
-+	paletextcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x550000FF);
-+	sizecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x550000FF);
-+	holdcol = dholdcol;
- }
--- a/rio-exit
+++ /dev/null
@@ -1,97 +1,0 @@
-diff -r c055db14ff2b sys/src/cmd/rio/dat.h
---- a/sys/src/cmd/rio/dat.h	Sun Dec 06 14:50:50 2020 +0100
-+++ b/sys/src/cmd/rio/dat.h	Sun Dec 06 15:36:58 2020 +0100
-@@ -308,6 +308,7 @@
- Display	*display;
- Image	*view;
- Screen	*wscreen;
-+Cursor	confirmcursor;
- Cursor	boxcursor;
- Cursor	crosscursor;
- Cursor	sightcursor;
-diff -r c055db14ff2b sys/src/cmd/rio/data.c
---- a/sys/src/cmd/rio/data.c	Sun Dec 06 14:50:50 2020 +0100
-+++ b/sys/src/cmd/rio/data.c	Sun Dec 06 15:36:58 2020 +0100
-@@ -10,6 +10,19 @@
- #include "dat.h"
- #include "fns.h"
- 
-+Cursor confirmcursor={
-+	0, 0,
-+	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+
-+	0x00, 0x0E, 0x07, 0x1F, 0x03, 0x17, 0x73, 0x6F,
-+	0xFB, 0xCE, 0xDB, 0x8C, 0xDB, 0xC0, 0xFB, 0x6C,
-+	0x77, 0xFC, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03,
-+	0x94, 0xA6, 0x63, 0x3C, 0x63, 0x18, 0x94, 0x90,
-+};
-+
- Cursor crosscursor = {
- 	{-7, -7},
- 	{0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0,
-diff -r c055db14ff2b sys/src/cmd/rio/rio.c
---- a/sys/src/cmd/rio/rio.c	Sun Dec 06 14:50:50 2020 +0100
-+++ b/sys/src/cmd/rio/rio.c	Sun Dec 06 15:36:58 2020 +0100
-@@ -26,6 +26,7 @@
- void		hide(void);
- void		unhide(int);
- void		newtile(int);
-+void		confirmexit(void);
- Image*	sweep(void);
- Image*	bandsize(Window*);
- Image*	drag(Window*);
-@@ -124,10 +125,6 @@
- 	Image *i;
- 	Rectangle r;
- 
--	if(strstr(argv[0], ".out") == nil){
--		menu3str[Exit] = nil;
--		Hidden--;
--	}
- 	initstr = nil;
- 	kbdin = nil;
- 	maxtab = 0;
-@@ -731,11 +728,8 @@
- 		hide();
- 		break;
- 	case Exit:
--		if(Hidden > Exit){
--			send(exitchan, nil);
--			break;
--		}
--		/* else fall through */
-+		confirmexit();
-+		break;
- 	default:
- 		unhide(i);
- 		break;
-@@ -1006,6 +1000,26 @@
- }
- 
- void
-+confirmexit(void)
-+{
-+	menuing = TRUE;
-+	riosetcursor(&confirmcursor);
-+	while(mouse->buttons == 0)
-+		readmouse(mousectl);
-+	if(mouse->buttons != 4)
-+		goto nope;
-+	while(mouse->buttons){
-+		if(mouse->buttons != 4)
-+			goto nope;
-+		readmouse(mousectl);
-+	}
-+	send(exitchan, nil);
-+nope:
-+	riosetcursor(nil);
-+	menuing = FALSE;
-+}
-+
-+void
- resize(void)
- {
- 	Window *w;
--- a/rio-pastel
+++ /dev/null
@@ -1,48 +1,0 @@
-diff 78c7ad88ffbfbd2b7a7269d863e5f4be7535b566 uncommitted
---- a/sys/src/cmd/rio/data.c
-+++ b/sys/src/cmd/rio/data.c
-@@ -175,30 +188,20 @@
- void
- iconinit(void)
- {
--	background = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x777777FF);
-+	background = display->black;
- 
- 	/* greys are multiples of 0x11111100+0xFF, 14* being palest */
--	cols[BACK] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xFFFFFFFF^reverse);
--	cols[BORD] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x999999FF^reverse);
--	cols[TEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x000000FF^reverse);
--	cols[HTEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x000000FF);
--	if(!reverse) {
--		cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xCCCCCCFF);
--		titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DGreygreen);
--		lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPalegreygreen);
--	} else {
--		cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPurpleblue);
--		titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPurpleblue);
--		lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x222222FF);
--	}
--	dholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DMedblue);
--	lightholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DGreyblue);
--	paleholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPalegreyblue);
--	paletextcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x666666FF^reverse);
--	sizecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DRed);
--
--	if(reverse == 0)
--		holdcol = dholdcol;
--	else
--		holdcol = paleholdcol;
-+	cols[BACK] = display->black;
-+	cols[BORD] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x111111FF);
-+	cols[TEXT] = display->white;
-+	cols[HTEXT] = display->black;
-+	cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x8f8f8fFF);
-+	titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xe4e4e4FF);
-+	lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x2c2c2cFF);
-+	dholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xffad00FF);
-+	lightholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xdcbc72FF);
-+	paleholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xccbd9eFF);
-+	paletextcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x5c5d5dFF);
-+	sizecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xfeba00FF);
-+	holdcol = dholdcol;
- }