From 55bb299483e54a48d029703c27e1881aa90b4548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Mon, 18 Mar 2002 22:38:25 +0000 Subject: [PATCH] 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 --- config/ChangeLog | 5 +++++ config/common.am | 2 +- src/ChangeLog | 3 +++ src/WorkArea.C | 15 +++++++++++---- src/WorkArea.h | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/config/ChangeLog b/config/ChangeLog index 4448c2244e..d75cab1234 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2002-03-18 Lars Gullik Bjønnes + + * common.am (DISTCLEANFILES): don't be recursive by default. + (remove -r) + 2002-03-15 Jean-Marc Lasgouttes * lyxinclude.m4 (LYX_PROG_CXX): also look at $CXX when searching diff --git a/config/common.am b/config/common.am index b684ef1452..0f14f70ad6 100644 --- a/config/common.am +++ b/config/common.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = foreign -DISTCLEANFILES= -r *.orig *.rej *~ *.bak core +DISTCLEANFILES= *.orig *.rej *~ *.bak core MAINTAINERCLEANFILES = $(srcdir)/Makefile.in diff --git a/src/ChangeLog b/src/ChangeLog index b0fa7c81f4..05094a4301 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-03-18 Lars Gullik Bjønnes + * 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 diff --git a/src/WorkArea.C b/src/WorkArea.C index 7b028ef122..9e77c3ff00 100644 --- a/src/WorkArea.C +++ b/src/WorkArea.C @@ -70,9 +70,11 @@ extern "C" { static int C_WorkAreaEventCB(FL_FORM * form, void * xev) { - WorkArea * wa=static_cast(form->u_vdata); - wa->event_cb(static_cast(xev)); - return 0; + WorkArea * wa = static_cast(form->u_vdata); + int ret = wa->event_cb(static_cast(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; } diff --git a/src/WorkArea.h b/src/WorkArea.h index b0b22efcda..c512b445bd 100644 --- a/src/WorkArea.h +++ b/src/WorkArea.h @@ -132,7 +132,7 @@ public: SigC::Signal0 selectionLost; /// handles SelectionRequest X Event, to fill the clipboard - void event_cb(XEvent * xev); + int event_cb(XEvent * xev); private: /// void createPixmap(int, int);