void disable_mouse(void) { int h = get_output_handle(); /* XXX: Is this all right? -- Miciah */ if (!mouse_enabled) return; unhandle_mouse(ditrm->mouse_h); if (is_xterm()) send_mouse_done_sequence(h); mouse_enabled = 0; }
static void send_done_sequence(int h, int altscreen) { write_sequence(h, DONE_BRACKETED_PASTE_SEQ); write_sequence(h, DONE_CLS_SEQ); #ifdef CONFIG_MOUSE send_mouse_done_sequence(h); #endif /* Switch from alternate screen. */ if (altscreen) { write_sequence(h, DONE_ALT_SCREEN_SEQ); } write_sequence(h, DONE_TERMINAL_SEQ); }