diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-11 14:42:59 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-11 15:38:03 +0000 |
| commit | e56066feefa5e90edbea099462b62e405dc9ef53 (patch) | |
| tree | cb408898508107a72e8f605d106bdbb27283a24b | |
| parent | selection: cleanup (diff) | |
selection: add selection_from_primary() API (stub for now)
| -rw-r--r-- | input.c | 5 | ||||
| -rw-r--r-- | selection.c | 6 | ||||
| -rw-r--r-- | selection.h | 1 |
3 files changed, 11 insertions, 1 deletions
@@ -354,8 +354,11 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, case WL_POINTER_BUTTON_STATE_PRESSED: if (button == BTN_LEFT) selection_start(term, term->mouse.col, term->mouse.row); - else + else { + if (button == BTN_MIDDLE) + selection_from_primary(term); selection_cancel(term); + } term->mouse.button = button; /* For motion events */ term_mouse_down(term, button, term->mouse.row, term->mouse.col, diff --git a/selection.c b/selection.c index c2b665d9..2b5bb140 100644 --- a/selection.c +++ b/selection.c @@ -338,6 +338,12 @@ selection_from_clipboard(struct terminal *term, uint32_t serial) close(read_fd); } +void +selection_from_primary(struct terminal *term) +{ + LOG_WARN("selection from PRIMARY"); +} + static void offer(void *data, struct wl_data_offer *wl_data_offer, const char *mime_type) { diff --git a/selection.h b/selection.h index 41fc5bbb..8a8cae48 100644 --- a/selection.h +++ b/selection.h @@ -13,3 +13,4 @@ void selection_cancel(struct terminal *term); void selection_to_clipboard(struct terminal *term, uint32_t serial); void selection_from_clipboard(struct terminal *term, uint32_t serial); +void selection_from_primary(struct terminal *term); |
