dont delere recursively, return a value from event_cb

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3771 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-03-18 22:38:25 +00:00
parent c18a87393d
commit 55bb299483
5 changed files with 21 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2002-03-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
* common.am (DISTCLEANFILES): don't be recursive by default.
(remove -r)
2002-03-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* lyxinclude.m4 (LYX_PROG_CXX): also look at $CXX when searching

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES= -r *.orig *.rej *~ *.bak core
DISTCLEANFILES= *.orig *.rej *~ *.bak core
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in

View File

@ -1,5 +1,8 @@
2002-03-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
* WorkArea.C (C_WorkAreaEvent): return a value.
(event_cb): return 1 if we handled the event, 0 otherwise.
* lyx_gui.C (LyX_XErrHandler): don't abort on BadWindow
2002-03-18 Juergen Vigna <jug@sad.it>

View File

@ -70,9 +70,11 @@ extern "C" {
static
int C_WorkAreaEventCB(FL_FORM * form, void * xev) {
WorkArea * wa=static_cast<WorkArea*>(form->u_vdata);
wa->event_cb(static_cast<XEvent*>(xev));
return 0;
WorkArea * wa = static_cast<WorkArea*>(form->u_vdata);
int ret = wa->event_cb(static_cast<XEvent*>(xev));
lyxerr << "Pending: " << XPending(fl_get_display()) << endl;
return ret;
}
}
@ -564,18 +566,23 @@ extern "C" {
} // namespace anon
void WorkArea::event_cb(XEvent * xev)
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;
}

View File

@ -132,7 +132,7 @@ public:
SigC::Signal0<void> selectionLost;
/// handles SelectionRequest X Event, to fill the clipboard
void event_cb(XEvent * xev);
int event_cb(XEvent * xev);
private:
///
void createPixmap(int, int);