… | |
… | |
1251 | int x, y; |
1251 | int x, y; |
1252 | int code = 32; |
1252 | int code = 32; |
1253 | |
1253 | |
1254 | x = Pixel2Col (ev.x); |
1254 | x = Pixel2Col (ev.x); |
1255 | y = Pixel2Row (ev.y); |
1255 | y = Pixel2Row (ev.y); |
1256 | if (ev.type == MotionNotify) { |
1256 | if (ev.type == MotionNotify) |
|
|
1257 | { |
1257 | if (x == mouse_row && y == mouse_col) |
1258 | if (x == mouse_row && y == mouse_col) |
1258 | return; |
1259 | return; |
1259 | mouse_row = x; |
1260 | mouse_row = x; |
1260 | mouse_col = y; |
1261 | mouse_col = y; |
1261 | code += 32; |
1262 | code += 32; |
1262 | } |
1263 | } |
1263 | |
1264 | |
1264 | if (MEvent.button == AnyButton) |
1265 | if (MEvent.button == AnyButton) |
1265 | button_number = 3; |
1266 | button_number = 3; |
1266 | else |
1267 | else |
1267 | { |
1268 | { |
… | |
… | |
1849 | mouse_report (ev); |
1850 | mouse_report (ev); |
1850 | } |
1851 | } |
1851 | #else |
1852 | #else |
1852 | MEvent.button = ev.button; |
1853 | MEvent.button = ev.button; |
1853 | mouse_report (ev); |
1854 | mouse_report (ev); |
1854 | #endif /* MOUSE_REPORT_DOUBLECLICK */ |
1855 | #endif /* MOUSE_REPORT_DOUBLECLICK */ |
1855 | |
1856 | |
1856 | } |
1857 | } |
1857 | else |
1858 | else |
1858 | { |
1859 | { |
1859 | if (ev.button != MEvent.button) |
1860 | if (ev.button != MEvent.button) |
… | |
… | |
1953 | tt_printf ("\033[5~"); |
1954 | tt_printf ("\033[5~"); |
1954 | break; |
1955 | break; |
1955 | } |
1956 | } |
1956 | } |
1957 | } |
1957 | else |
1958 | else |
1958 | #endif /* NO_SCROLLBAR_REPORT */ |
1959 | #endif /* NO_SCROLLBAR_REPORT */ |
1959 | |
1960 | |
1960 | { |
1961 | { |
1961 | char upordown = 0; |
1962 | char upordown = 0; |
1962 | |
1963 | |
1963 | if (scrollBar.style == R_SB_NEXT) |
1964 | if (scrollBar.style == R_SB_NEXT) |
… | |
… | |
2100 | mouse_report (ev); |
2101 | mouse_report (ev); |
2101 | } |
2102 | } |
2102 | #else /* MOUSE_REPORT_DOUBLECLICK */ |
2103 | #else /* MOUSE_REPORT_DOUBLECLICK */ |
2103 | MEvent.button = AnyButton; |
2104 | MEvent.button = AnyButton; |
2104 | mouse_report (ev); |
2105 | mouse_report (ev); |
2105 | #endif /* MOUSE_REPORT_DOUBLECLICK */ |
2106 | #endif /* MOUSE_REPORT_DOUBLECLICK */ |
2106 | return; |
2107 | return; |
2107 | } |
2108 | } |
2108 | |
2109 | |
2109 | /* |
2110 | /* |
2110 | * dumb hack to compensate for the failure of click-and-drag |
2111 | * dumb hack to compensate for the failure of click-and-drag |
… | |
… | |
2447 | } |
2448 | } |
2448 | } |
2449 | } |
2449 | |
2450 | |
2450 | pclose_printer (fd); |
2451 | pclose_printer (fd); |
2451 | } |
2452 | } |
2452 | #endif /* PRINTPIPE */ |
2453 | #endif /* PRINTPIPE */ |
2453 | /*}}} */ |
2454 | /*}}} */ |
2454 | |
2455 | |
2455 | /* *INDENT-OFF* */ |
2456 | /* *INDENT-OFF* */ |
2456 | enum { |
2457 | enum { |
2457 | C1_40 = 0x40, |
2458 | C1_40 = 0x40, |
… | |
… | |
3697 | case 1001: |
3698 | case 1001: |
3698 | break; /* X11 mouse highlighting */ |
3699 | break; /* X11 mouse highlighting */ |
3699 | #endif |
3700 | #endif |
3700 | case 1002: |
3701 | case 1002: |
3701 | case 1003: |
3702 | case 1003: |
3702 | if (state) { |
3703 | if (state) |
|
|
3704 | { |
3703 | priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseX11); |
3705 | priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseX11); |
3704 | priv_modes &= arg[i] == 1003 ? ~PrivMode_MouseBtnEvent : ~PrivMode_MouseAnyEvent; |
3706 | priv_modes &= arg[i] == 1003 ? ~PrivMode_MouseBtnEvent : ~PrivMode_MouseAnyEvent; |
3705 | vt_emask_mouse = PointerMotionMask; |
3707 | vt_emask_mouse = PointerMotionMask; |
|
|
3708 | } |
3706 | } else |
3709 | else |
3707 | vt_emask_mouse = NoEventMask; |
3710 | vt_emask_mouse = NoEventMask; |
3708 | vt_select_input (); |
3711 | vt_select_input (); |
3709 | break; |
3712 | break; |
3710 | case 1010: /* scroll to bottom on TTY output inhibit */ |
3713 | case 1010: /* scroll to bottom on TTY output inhibit */ |
3711 | set_option (Opt_scrollTtyOutput, !state); |
3714 | set_option (Opt_scrollTtyOutput, !state); |