wayland: change all wayland callbacks to take a wayland pointer

Instead of passing the terminal to the wayland callbacks, pass a
'struct wayland' pointer.
This commit is contained in:
Daniel Eklöf 2019-10-27 18:43:07 +01:00
parent eda04d0560
commit 9f0b1f94c2
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
8 changed files with 269 additions and 215 deletions

View file

@ -742,8 +742,8 @@ selection(void *data, struct wl_data_device *wl_data_device,
{
/* Selection offer from other client */
struct terminal *term = data;
struct wl_clipboard *clipboard = &term->wl.clipboard;
struct wayland *wayl = data;
struct wl_clipboard *clipboard = &wayl->clipboard;
if (clipboard->data_offer != NULL)
wl_data_offer_destroy(clipboard->data_offer);
@ -791,8 +791,8 @@ primary_selection(void *data,
{
/* Selection offer from other client, for primary */
struct terminal *term = data;
struct wl_primary *primary = &term->wl.primary;
struct wayland *wayl = data;
struct wl_primary *primary = &wayl->primary;
if (primary->data_offer != NULL)
zwp_primary_selection_offer_v1_destroy(primary->data_offer);