JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
remove commented-out code for mode_mouse
authorJason Woofenden <jason@jasonwoof.com>
Sat, 10 Oct 2015 18:38:31 +0000 (14:38 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Sat, 10 Oct 2015 18:38:31 +0000 (14:38 -0400)
st.c

diff --git a/st.c b/st.c
index 0632637..d4d3cfb 100644 (file)
--- a/st.c
+++ b/st.c
@@ -821,67 +821,7 @@ getbuttoninfo(XEvent *e) {
 
 void
 mousereport(XEvent *e) {
-       return; // jason
-//     int x = x2col(e->xbutton.x), y = y2row(e->xbutton.y),
-//         button = e->xbutton.button, state = e->xbutton.state,
-//         len;
-//     char buf[40];
-//     static int ox, oy;
-//
-//     /* from urxvt */
-//     if(e->xbutton.type == MotionNotify) {
-//             if(x == ox && y == oy)
-//                     return;
-//             if(!IS_SET(MODE_MOUSEMOTION) && !IS_SET(MODE_MOUSEMANY))
-//                     return;
-//             /* MOUSE_MOTION: no reporting if no button is pressed */
-//             if(IS_SET(MODE_MOUSEMOTION) && oldbutton == 3)
-//                     return;
-//
-//             button = oldbutton + 32;
-//             ox = x;
-//             oy = y;
-//     } else {
-//             if(!IS_SET(MODE_MOUSESGR) && e->xbutton.type == ButtonRelease) {
-//                     button = 3;
-//             } else {
-//                     button -= Button1;
-//                     if(button >= 3)
-//                             button += 64 - 3;
-//             }
-//             if(e->xbutton.type == ButtonPress) {
-//                     oldbutton = button;
-//                     ox = x;
-//                     oy = y;
-//             } else if(e->xbutton.type == ButtonRelease) {
-//                     oldbutton = 3;
-//                     /* MODE_MOUSEX10: no button release reporting */
-//                     if(IS_SET(MODE_MOUSEX10))
-//                             return;
-//                     if (button == 64 || button == 65)
-//                             return;
-//             }
-//     }
-//
-//     if(!IS_SET(MODE_MOUSEX10)) {
-//             button += (state & ShiftMask   ? 4  : 0)
-//                     + (state & Mod4Mask    ? 8  : 0)
-//                     + (state & ControlMask ? 16 : 0);
-//     }
-//
-//     len = 0;
-//     if(IS_SET(MODE_MOUSESGR)) {
-//             len = snprintf(buf, sizeof(buf), "\033[<%d;%d;%d%c",
-//                             button, x+1, y+1,
-//                             e->xbutton.type == ButtonRelease ? 'm' : 'M');
-//     } else if(x < 223 && y < 223) {
-//             len = snprintf(buf, sizeof(buf), "\033[M%c%c%c",
-//                             32+button, 32+x+1, 32+y+1);
-//     } else {
-//             return;
-//     }
-//
-//     ttywrite(buf, len);
+       return;
 }
 
 void
@@ -889,11 +829,6 @@ bpress(XEvent *e) {
        struct timespec now;
        Mousekey *mk;
 
-       // Jasonif(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
-       // Jason        mousereport(e);
-       // Jason        return;
-       // Jason}
-
        for(mk = mshortcuts; mk < mshortcuts + LEN(mshortcuts); mk++) {
                if(e->xbutton.button == mk->b
                                && match(mk->mask, e->xbutton.state)) {
@@ -1141,11 +1076,6 @@ xsetsel(char *str) {
 
 void
 brelease(XEvent *e) {
-       //Jasonif(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
-       //Jason mousereport(e);
-       //Jason return;
-       //Jason}
-
        if(e->xbutton.button == Button2) {
                selpaste(NULL);
        } else if(e->xbutton.button == Button1) {
@@ -1164,11 +1094,6 @@ void
 bmotion(XEvent *e) {
        int oldey, oldex, oldsby, oldsey;
 
-       //Jasonif(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
-       //Jason mousereport(e);
-       //Jason return;
-       //Jason}
-
        if(!sel.mode)
                return;