mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
selection: add selection_from_primary() API (stub for now)
This commit is contained in:
parent
5e1715be18
commit
e56066feef
3 changed files with 11 additions and 1 deletions
5
input.c
5
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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue