From b368873f4d908a8ccd71434e1d595d72d4dc6fe2 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 24 Feb 2019 12:16:32 +1100 Subject: [PATCH] [client] x11: ignore clipboard select events from ourself --- client/clipboard/x11.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/clipboard/x11.c b/client/clipboard/x11.c index a6af6025..c2b71719 100644 --- a/client/clipboard/x11.c +++ b/client/clipboard/x11.c @@ -217,7 +217,10 @@ static void x11_cb_wmevent(SDL_SysWMmsg * msg) } // if someone selected data - if (e.type == this->eventBase + XFixesSelectionNotify && ( + if ( + e.type == this->eventBase + XFixesSelectionNotify && + ((XFixesSelectionNotifyEvent *)&e)->owner != this->window && + ( ((XFixesSelectionNotifyEvent *)&e)->selection == XA_PRIMARY || ((XFixesSelectionNotifyEvent *)&e)->selection == this->aSelection) )