[XForms] New pre-release 1.0.91pre3

Michal Szymanski msz at astrouw.edu.pl
Thu Mar 27 09:56:52 EDT 2008

To subscribers of the xforms list

Hi XFormers,

There is a problem with events servicing, apparently introduced in the
latest (pre3, or pre2, I did not check the pre2) version.

I have an application for displaying FITS images, using canvas.
While the mouse pointer is in the image canvas, its coordinates should
be printed in the main app window, both at rest and while moving.

It has always been working fine, including the first 1.0.91 version
provided by Jens. With the "pre3" version, it does not work. When the
mouse enters the canvas, a single position is printed but then it does
not change when the mouse moves around, unless I click the button or
leave the canvas and enter again. Even then I get only single position
printed. The code did not change at all so it must be something inside
the library.

The excerpt from the code follows.

any ideas?

regards, Michal.

  Michal Szymanski (msz at astrouw dot edu dot pl)
  Warsaw University Observatory, Warszawa, POLAND

im_canvas_motion(FL_OBJECT *ob, Window win, int ww, int hh,
		 XEvent *ev, void *d)
  FD_image *ui = d;
  int X, Y, x, y, w ,h;
  double pixval;
  if ( pixbuf == NULL ) return 0;
  mouse_xlib_x = ev->xmotion.x;
  mouse_xlib_y = ev->xmotion.y;
  xy_xlib2image(mouse_xlib_x, mouse_xlib_y, &X, &Y);
  sprintf(position,"%4d %4d", X, Y);
  fl_set_object_label(ui->position, position);

The handler is registered when application starts, with:

void init_canvas(FD_image *fdui)
  FL_OBJECT *canvas;

  canvas = fdui->canvas;
  fl_add_canvas_handler(canvas, MotionNotify, im_canvas_motion, fdui);
   cut (other handlers)

To unsubscribe, send any message to
xforms-leave at bob.usuhs.mil or see: 
List Archive: http://bob.usuhs.mil/pipermail/xforms and
Development: http://savannah.nongnu.org/files/?group=xforms

More information about the Xforms mailing list