mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
* src/frontends/qt4/GuiApplication.C
(GuiApplication::x11EventFilter): Small optimization: Do not request the current BufferView if it is not used git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16506 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f04eabb1cd
commit
2f66789cc8
@ -276,23 +276,25 @@ bool GuiApplication::x11EventFilter(XEvent * xev)
|
||||
if (!currentView())
|
||||
return false;
|
||||
|
||||
BufferView * bv = currentView()->view();
|
||||
|
||||
switch (xev->type) {
|
||||
case SelectionRequest:
|
||||
case SelectionRequest: {
|
||||
lyxerr[Debug::GUI] << "X requested selection." << endl;
|
||||
BufferView * bv = currentView()->view();
|
||||
if (bv) {
|
||||
lyx::docstring const sel = bv->requestSelection();
|
||||
if (!sel.empty())
|
||||
selection_.put(sel);
|
||||
}
|
||||
break;
|
||||
case SelectionClear:
|
||||
}
|
||||
case SelectionClear: {
|
||||
lyxerr[Debug::GUI] << "Lost selection." << endl;
|
||||
BufferView * bv = currentView()->view();
|
||||
if (bv)
|
||||
bv->clearSelection();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user