mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
selection: add selection_<type>_has_data()
Returns true when there is data available for paste in the clipboard/primary selection.
This commit is contained in:
parent
c3cacb4704
commit
dec6f963cb
2 changed files with 15 additions and 0 deletions
12
selection.c
12
selection.c
|
|
@ -661,6 +661,18 @@ selection_cancel(struct terminal *term)
|
|||
term->selection.ongoing = false;
|
||||
}
|
||||
|
||||
bool
|
||||
selection_clipboard_has_data(const struct seat *seat)
|
||||
{
|
||||
return seat->clipboard.data_offer != NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
selection_primary_has_data(const struct seat *seat)
|
||||
{
|
||||
return seat->primary.data_offer != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
selection_clipboard_unset(struct seat *seat)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue