aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-11 14:42:59 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-11 15:38:03 +0000
commite56066feefa5e90edbea099462b62e405dc9ef53 (patch)
treecb408898508107a72e8f605d106bdbb27283a24b /input.c
parentselection: cleanup (diff)
selection: add selection_from_primary() API (stub for now)
Diffstat (limited to 'input.c')
-rw-r--r--input.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/input.c b/input.c
index 934fc5af..db348887 100644
--- a/input.c
+++ b/input.c
@@ -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,