]> git.lizzy.rs Git - plan9front.git/commitdiff
winwatch: no more 'l' key labeling
authorspew <devnull@localhost>
Wed, 26 Oct 2016 19:01:13 +0000 (14:01 -0500)
committerspew <devnull@localhost>
Wed, 26 Oct 2016 19:01:13 +0000 (14:01 -0500)
sys/man/1/winwatch
sys/src/cmd/winwatch.c

index a14d4ecb5c245dd9348e092eb4cf0aac5e9fd08e..a2d57a07dfedec1b4ced31b789d20214d778bdfc 100644 (file)
@@ -24,9 +24,6 @@ or
 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
index 2b35a45426b0e459013602c232b1b81cb8f5656a..b54e40f6314033e7effb7231bab13e52dc4fe336 100644 (file)
@@ -299,44 +299,9 @@ click(Mouse m)
                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
@@ -393,8 +358,6 @@ main(int argc, char **argv)
                case Ekeyboard:
                        if(e.kbdc==Kdel || e.kbdc=='q')
                                exits(0);
-                       if(e.kbdc == 'l')
-                               kbdlabel();
                        break;
                case Emouse:
                        if(click(e.mouse) == 0)