mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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
This commit is contained in:
parent
e7a6fa7b2b
commit
e2da99d6a9
@ -46,6 +46,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xlib.h>
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user