diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-22 07:14:18 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-25 16:56:15 +0000 |
| commit | e570146c07b43ffacde6518e35b734b87095ed56 (patch) | |
| tree | 37040eff5cd0fbde190bff24f73b3b279aaa7799 /terminal.h | |
| parent | selection: add a 2 second timeout when receiving clipboard data (diff) | |
selection: block non-paste data from being sent to client while pasting
While pasting data from the clipboard, block *all* other data from
being sent to the client. This includes keyboard and mouse events, but
also replies for VT queries.
This is particularly important when bracketed paste has been enabled,
since then the client will interpret *everything* between the
bracketed paste start and end as paste data.
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -205,6 +205,8 @@ enum term_surface { TERM_SURF_BUTTON_CLOSE, }; +typedef tll(struct ptmx_buffer) ptmx_buffer_list_t; + struct terminal { struct fdm *fdm; struct reaper *reaper; @@ -226,7 +228,9 @@ struct terminal { float font_dpi; enum fcft_subpixel font_subpixel; - tll(struct ptmx_buffer) ptmx_buffer; + bool is_sending_paste_data; + ptmx_buffer_list_t ptmx_buffers; + ptmx_buffer_list_t ptmx_paste_buffers; enum cursor_origin origin; enum cursor_keys cursor_keys_mode; @@ -489,6 +493,8 @@ int term_destroy(struct terminal *term); void term_reset(struct terminal *term, bool hard); bool term_to_slave(struct terminal *term, const void *data, size_t len); +bool term_paste_data_to_slave( + struct terminal *term, const void *data, size_t len); bool term_font_size_increase(struct terminal *term); bool term_font_size_decrease(struct terminal *term); |
