]> git.lyx.org Git - features.git/commitdiff
Move the explanation of "why" into the source code and leave just "what"
authorAngus Leeming <leeming@lyx.org>
Tue, 15 Oct 2002 17:24:08 +0000 (17:24 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 15 Oct 2002 17:24:08 +0000 (17:24 +0000)
in the ChangeLog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5418 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/XWorkArea.C

index 09b90b0cd274727233b2fb8bd71cc352472e1ef3..71cb119419e57a7a9962d37872ea67f074087401 100644 (file)
@@ -1,11 +1,7 @@
 2002-10-15  Angus Leeming  <leeming@lyx.org>
 
-       * XWorkArea.C (work_area_handler): it transpires that
-         ev->xbutton.button == 0 when the mouse is dragged,
-         so it cannot be used to initialise x_button_state and
-         hence FuncRequest.
-         This patch uses the 'key' that is passed into the function
-         by xforms to extract this info and so resolve the problem.
+       * XWorkArea.C (work_area_handler): Pass the mouse button correctly to
+       dispatch on LFUN_MOUSE_MOTION.
 
 2002-10-15  Angus Leeming  <leeming@lyx.org>
 
index 1f0bd3beab561416cb4be863223f931961443286..ff3a66e532b4a43ac6b3077a5fe3beb019782d5b 100644 (file)
@@ -368,11 +368,25 @@ int XWorkArea::work_area_handler(FL_OBJECT * ob, int event,
                        y_old = ev->xmotion.y;
                        scrollbar_value_old = fl_get_scrollbar_value(area->scrollbar);
                        lyxerr[Debug::WORKAREA] << "Workarea event: MOUSE" << endl;
-                       area->dispatch(
-                               FuncRequest(LFUN_MOUSE_MOTION,
-                                           ev->xbutton.x - ob->x,
-                                           ev->xbutton.y - ob->y,
-                                           x_button_state(key)));
+
+                       // It transpires that ev->xbutton.button == 0 when
+                       // the mouse is dragged, so it cannot be used to
+                       // initialise x_button_state and hence FuncRequest.
+
+                       // The 'key' that is passed into the function does
+                       // contain the necessary info, however.
+
+                       // It is for this reason that x_button_state has
+                       // been modified to work with key
+                       // rather than ev->xbutton.button.
+
+                       // Angus 15 Oct 2002.
+                       FuncRequest cmd(LFUN_MOUSE_MOTION,
+                                       ev->xbutton.x - ob->x,
+                                       ev->xbutton.y - ob->y,
+                                       x_button_state(key));
+                       area->dispatch(cmd);
+                       
                }
                break;
 #if FL_VERSION < 1 && FL_REVISION < 89