Mercurial > vim
comparison src/gui_x11.c @ 8281:74b15ed0a259 v7.4.1433
commit https://github.com/vim/vim/commit/85b11769ab507c7df93f319fd964fa579701b76b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 27 18:13:23 2016 +0100
patch 7.4.1433
Problem: The Sniff interface is no longer useful, the tool has not been
available for may years.
Solution: Delete the Sniff interface and related code.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 27 Feb 2016 18:15:07 +0100 |
parents | 226ed297307f |
children | 5e18efdad322 |
comparison
equal
deleted
inserted
replaced
8280:65bed5ff0ba6 | 8281:74b15ed0a259 |
---|---|
143 static void gui_x11_resize_window_cb(Widget w, XtPointer dud, XEvent *event, Boolean *dum); | 143 static void gui_x11_resize_window_cb(Widget w, XtPointer dud, XEvent *event, Boolean *dum); |
144 static void gui_x11_focus_change_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); | 144 static void gui_x11_focus_change_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); |
145 static void gui_x11_enter_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); | 145 static void gui_x11_enter_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); |
146 static void gui_x11_leave_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); | 146 static void gui_x11_leave_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); |
147 static void gui_x11_mouse_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); | 147 static void gui_x11_mouse_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum); |
148 #ifdef FEAT_SNIFF | |
149 static void gui_x11_sniff_request_cb(XtPointer closure, int *source, XtInputId *id); | |
150 #endif | |
151 static void gui_x11_check_copy_area(void); | 148 static void gui_x11_check_copy_area(void); |
152 #ifdef FEAT_CLIENTSERVER | 149 #ifdef FEAT_CLIENTSERVER |
153 static void gui_x11_send_event_handler(Widget, XtPointer, XEvent *, Boolean *); | 150 static void gui_x11_send_event_handler(Widget, XtPointer, XEvent *, Boolean *); |
154 #endif | 151 #endif |
155 static void gui_x11_wm_protocol_handler(Widget, XtPointer, XEvent *, Boolean *); | 152 static void gui_x11_wm_protocol_handler(Widget, XtPointer, XEvent *, Boolean *); |
1161 vim_modifiers |= MOUSE_ALT; | 1158 vim_modifiers |= MOUSE_ALT; |
1162 | 1159 |
1163 gui_send_mouse_event(button, x, y, repeated_click, vim_modifiers); | 1160 gui_send_mouse_event(button, x, y, repeated_click, vim_modifiers); |
1164 } | 1161 } |
1165 | 1162 |
1166 #ifdef FEAT_SNIFF | |
1167 /* ARGSUSED */ | |
1168 static void | |
1169 gui_x11_sniff_request_cb( | |
1170 XtPointer closure UNUSED, | |
1171 int *source UNUSED, | |
1172 XtInputId *id UNUSED) | |
1173 { | |
1174 static char_u bytes[3] = {CSI, (int)KS_EXTRA, (int)KE_SNIFF}; | |
1175 | |
1176 add_to_input_buf(bytes, 3); | |
1177 } | |
1178 #endif | |
1179 | |
1180 /* | 1163 /* |
1181 * End of call-back routines | 1164 * End of call-back routines |
1182 */ | 1165 */ |
1183 | 1166 |
1184 /* | 1167 /* |
2816 * this function (otherwise a random value on the stack may be changed). | 2799 * this function (otherwise a random value on the stack may be changed). |
2817 */ | 2800 */ |
2818 static int timed_out; | 2801 static int timed_out; |
2819 XtIntervalId timer = (XtIntervalId)0; | 2802 XtIntervalId timer = (XtIntervalId)0; |
2820 XtInputMask desired; | 2803 XtInputMask desired; |
2821 #ifdef FEAT_SNIFF | |
2822 static int sniff_on = 0; | |
2823 static XtInputId sniff_input_id = 0; | |
2824 #endif | |
2825 | 2804 |
2826 timed_out = FALSE; | 2805 timed_out = FALSE; |
2827 | |
2828 #ifdef FEAT_SNIFF | |
2829 if (sniff_on && !want_sniff_request) | |
2830 { | |
2831 if (sniff_input_id) | |
2832 XtRemoveInput(sniff_input_id); | |
2833 sniff_on = 0; | |
2834 } | |
2835 else if (!sniff_on && want_sniff_request) | |
2836 { | |
2837 sniff_input_id = XtAppAddInput(app_context, fd_from_sniff, | |
2838 (XtPointer)XtInputReadMask, gui_x11_sniff_request_cb, 0); | |
2839 sniff_on = 1; | |
2840 } | |
2841 #endif | |
2842 | 2806 |
2843 if (wtime > 0) | 2807 if (wtime > 0) |
2844 timer = XtAppAddTimeOut(app_context, (long_u)wtime, gui_x11_timer_cb, | 2808 timer = XtAppAddTimeOut(app_context, (long_u)wtime, gui_x11_timer_cb, |
2845 &timed_out); | 2809 &timed_out); |
2846 | 2810 |