From d8969b38e4fcb93b374721406676560b43a1ff1d Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 15 Aug 2002 10:04:55 +0000 Subject: [PATCH] fix workarea perf bug when keeping mouse pressed git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4989 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/WorkArea.C | 5 ++++- status.12x | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d1716e8aac..d002ff7250 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-07-26 John Levon + + * WorkArea.C (work_area_handler): set y_old and x_old to some + values in the MOUSE or DRAG events + 2002-08-06 John Levon * sp_spell.C: let the new aspell pspell work diff --git a/src/WorkArea.C b/src/WorkArea.C index d2449b76d2..b061698e41 100644 --- a/src/WorkArea.C +++ b/src/WorkArea.C @@ -335,7 +335,7 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event, { static int x_old = -1; static int y_old = -1; - static long scrollbar_value_old = -1; + static double scrollbar_value_old = -1; XEvent * ev = static_cast(xev); WorkArea * area = static_cast(ob->u_vdata); @@ -378,6 +378,9 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event, ev->xmotion.y != y_old || fl_get_scrollbar_value(area->scrollbar) != scrollbar_value_old ) { + x_old = ev->xmotion.x; + y_old = ev->xmotion.y; + scrollbar_value_old = fl_get_scrollbar_value(area->scrollbar); lyxerr[Debug::WORKAREA] << "Workarea event: MOUSE" << endl; area->workAreaMotionNotify(ev->xmotion.x - ob->x, ev->xmotion.y - ob->y, diff --git a/status.12x b/status.12x index f012761990..7eddd1181b 100644 --- a/status.12x +++ b/status.12x @@ -71,7 +71,7 @@ What's new - fix bug where using case changing commands on the last word of a paragraph would change the whole document (without any undo possible!) -- fix performance bug when selecting table cells with the mouse +- fix performance bugs when selecting with the mouse - in commands that operate on words (Insert>Index...), make sure not to include insets in words