Skip to content

Commit 42e5501

Browse files
committed
clipboard-wayland: add death message
Used to signal clipboard backend uninit.
1 parent ad6a14b commit 42e5501

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

player/clipboard/clipboard-wayland.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#include "osdep/poll_wrapper.h"
2828
#include "osdep/threads.h"
2929

30+
static const char MESSAGE_DEATH = 0;
31+
3032
struct clipboard_wayland_data_offer {
3133
struct ext_data_control_offer_v1 *offer;
3234
char *mime_type;
@@ -503,7 +505,7 @@ static void uninit(struct clipboard_ctx *cl)
503505
struct clipboard_wayland_priv *priv = cl->priv;
504506
if (!priv)
505507
return;
506-
(void)write(priv->message_pipe[1], &(char){0}, 1);
508+
(void)write(priv->message_pipe[1], &(char){MESSAGE_DEATH}, 1);
507509
mp_thread_join(priv->thread);
508510
close(priv->message_pipe[0]);
509511
close(priv->message_pipe[1]);

0 commit comments

Comments
 (0)