Angus Leeming wrote: > This is using XForms cvs, but all is well with lyx 1.3.x, so I think > that the problem lies with LyX, not XForms. > > Click on the scrollbar trough or on the arrow buttons. No repeat > occurs.
This turns out to be quite interesting. It may even lead to Jean-Marc's buggy pop-up menus being fixed. Two fixes are possible. The correct fix is to the XForms sources: Index: lib//forms.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/forms.c,v retrieving revision 1.12 diff -u -p -r1.12 forms.c --- lib//forms.c 18 May 2004 13:57:42 -0000 1.12 +++ lib//forms.c 1 Jun 2004 13:49:15 -0000 @@ -1357,7 +1357,7 @@ fl_handle_form(FL_FORM * form, int event obj = fl_find_last(form, FL_FIND_MOUSE, xx, yy); } -#if 1 +#if 0 /* this is an ugly hack. This is necessary due to popup pointer grab where a button release is eaten. Really should do a send event from the pop-up routines */ if (fl_pushobj && !button_down(fl_keymask) /* && event == FL_ENTER */ ) { obj = fl_pushobj; fl_pushobj = NULL; fl_handle_object(obj, FL_RELEASE, xx, yy, key, xev); } #endif This 'ugly hack', which resets fl_pushobj, prevents the correct event from being dispatched a little later in fl_handle_form: switch (event) case FL_MOUSE: /* Mouse position changed in the form */ if (fl_pushobj != NULL) fl_handle_object(fl_pushobj, FL_MOUSE, xx, yy, key, xev); All is well in lyx 1.3.x because the event is never received that causes the code inside the #if block to be executed. Clearly, however, we would have to fix the pop-up routines first. So, why isn't the event received in lyx 1.3.x? Well, that all goes back to the clever "only redraw the bit of the lyx screen where the changes occurred" stuff of a few weeks ago, forcing lyx to redraw all of the screen as of old, If we change the LyX sources, so: Index: src/frontends/xforms/XWorkArea.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/XWorkArea.C,v retrieving revision 1.47 diff -u -p -r1.47 XWorkArea.C --- src/frontends/xforms//XWorkArea.C 19 May 2004 15:11:37 -0000 1.47 +++ src/frontends/xforms//XWorkArea.C 1 Jun 2004 13:45:25 -0000 @@ -175,7 +175,8 @@ XWorkArea::XWorkArea(LyXView & owner, in val.function = GXcopy; val.graphics_exposures = false; copy_gc = XCreateGC(fl_get_display(), RootWindow(fl_get_display(), 0), - GCFunction | GCGraphicsExposures, &val); + GCFunction, &val); +// GCFunction | GCGraphicsExposures, &val); } Then the scrollbar will work once more at the expense of a return to the crappy drawing behaviour of the lyx screen. -- Angus