shithub: riscv

Download patch

ref: ef8cbbba03de2e3785a6170e9e7c4f6ca5f4aa78
parent: c9d55cadb36a6667d61d0001b0f7619c74431d4a
parent: cf5d24033d2869aedf9d578af5b267143356dd22
author: cinap_lenrek <[email protected]>
date: Sat Oct 29 22:17:12 EDT 2016

merge

--- a/sys/man/1/winwatch
+++ b/sys/man/1/winwatch
@@ -24,9 +24,6 @@
 DEL
 quits
 .IR winwatch .
-Typing
-.B l
-and selecting a window by a click also prompts for a new label.
 .PP
 If the
 .B -e
--- a/sys/src/cmd/winwatch.c
+++ b/sys/src/cmd/winwatch.c
@@ -299,47 +299,12 @@
 		return label(win[i], m);
 	case 4:
 		return unhide(win[i]);
+	default:
+		return 0;
 	}
-	return 1;
 }
 
-Cursor crosscursor = {
-	{-7, -7},
-	{0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0,
-	 0x03, 0xC0, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-	 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xC0, 0x03, 0xC0,
-	 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, },
-	{0x00, 0x00, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80,
-	 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x7F, 0xFE,
-	 0x7F, 0xFE, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80,
-	 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x00, 0x00, }
-};
-
 void
-kbdlabel(void)
-{
-	Mouse m;
-	int i;
-
-	esetcursor(&crosscursor);
-	do
-		m = emouse();
-	while((m.buttons & 7) == 0);
-	do
-		m = emouse();
-	while((m.buttons & 7) == 1);
-	esetcursor(nil);
-	if((m.buttons & 7) != 0)
-		return;
-	for(i=0; i<nwin; i++)
-		if(ptinrect(m.xy, win[i].r))
-			break;
-	if(i == nwin)
-		return;
-	label(win[i], m);
-}
-
-void
 usage(void)
 {
 	fprint(2, "usage: winwatch [-e exclude] [-f font]\n");
@@ -393,8 +358,6 @@
 		case Ekeyboard:
 			if(e.kbdc==Kdel || e.kbdc=='q')
 				exits(0);
-			if(e.kbdc == 'l')
-				kbdlabel();
 			break;
 		case Emouse:
 			if(click(e.mouse) == 0)