+
+int WorkArea::event_cb(XEvent * xev)
+{
+ int ret = 0;
+ switch (xev->type) {
+ case SelectionRequest:
+ lyxerr[Debug::GUI] << "X requested selection." << endl;
+ selectionRequested.emit();
+// ret = 1;
+ break;
+ case SelectionClear:
+ lyxerr[Debug::GUI] << "Lost selection." << endl;
+ selectionLost.emit();
+// ret = 1;
+ break;
+ }
+ return ret;
+}
+
+
+void WorkArea::haveSelection(bool yes) const
+{
+ if (!yes) {
+ XSetSelectionOwner(fl_get_display(), XA_PRIMARY, None, CurrentTime);
+ return;
+ }
+
+ XSetSelectionOwner(fl_get_display(), XA_PRIMARY, FL_ObjWin(work_area), CurrentTime);
+}
+
+
+string const WorkArea::getClipboard() const