From e2da99d6a96c8b9850293fd7ebb4ebf486f9ca6f Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Fri, 5 Jan 2007 10:11:21 +0000 Subject: [PATCH] Fix another selection bug * src/frontends/qt4/GuiApplication.C (GuiApplication::x11EventFilter): Only send or clear the selection if the X event specified the primary selection. Previously this was also done if the event specified the clipboard. We must ignore that, because the clipboard is completele handled by qt. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16526 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.C | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiApplication.C b/src/frontends/qt4/GuiApplication.C index 3d46f0f2ab..8433d9baa6 100644 --- a/src/frontends/qt4/GuiApplication.C +++ b/src/frontends/qt4/GuiApplication.C @@ -46,6 +46,7 @@ #include #ifdef Q_WS_X11 +#include #include #endif @@ -278,16 +279,20 @@ bool GuiApplication::x11EventFilter(XEvent * xev) switch (xev->type) { case SelectionRequest: { + if (xev->xselectionrequest.selection != XA_PRIMARY) + break; lyxerr[Debug::GUI] << "X requested selection." << endl; BufferView * bv = currentView()->view(); if (bv) { - lyx::docstring const sel = bv->requestSelection(); + docstring const sel = bv->requestSelection(); if (!sel.empty()) selection_.put(sel); } break; } case SelectionClear: { + if (xev->xselectionclear.selection != XA_PRIMARY) + break; lyxerr[Debug::GUI] << "Lost selection." << endl; BufferView * bv = currentView()->view(); if (bv) -- 2.39.5