? build ? forms.diff ? pending ? popup.diff Index: ChangeLog =================================================================== RCS file: /cvsroot/xforms/xforms/ChangeLog,v retrieving revision 1.115 diff -u -p -r1.115 ChangeLog --- ChangeLog 3 Jun 2004 15:49:15 -0000 1.115 +++ ChangeLog 4 Jun 2004 13:57:45 -0000 @@ -1,3 +1,11 @@ +2004-06-04 Angus Leeming + + * lib/forms.c (fl_handle_form): remove 'ugly hack'. + + * lib/xpopup.c (pup_interact): dispatch XSendEvent if the + ButtonRelease event just popped off the queue is needed to "unpush" + a "pushed" object. + 2004-06-03 Angus Leeming * lib/Makefile.am (EXTRA_DIST): distribute dirent_vms.h and 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 4 Jun 2004 13:57:48 -0000 @@ -1357,19 +1357,6 @@ fl_handle_form(FL_FORM * form, int event obj = fl_find_last(form, FL_FIND_MOUSE, xx, yy); } -#if 1 - /* 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 - switch (event) { Index: lib/xpopup.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/xpopup.c,v retrieving revision 1.12 diff -u -p -r1.12 xpopup.c --- lib/xpopup.c 18 May 2004 13:57:49 -0000 1.12 +++ lib/xpopup.c 4 Jun 2004 13:57:49 -0000 @@ -82,7 +82,7 @@ typedef struct { char *title; /* Menu title */ Window win; /* menu window */ - Window parent; /* and its paranet */ + Window parent; /* and its parent */ Cursor cursor; /* cursor for the pup */ GC shadowGC; /* GC for the shadow */ GC pupGC1; /* GC for maintext */ @@ -934,7 +934,19 @@ pup_interact(PopUP * m) XEvent xev; if (XCheckTypedEvent(flx->display, ButtonRelease, &xev)) { - /* fl_print_xevent_name("pop",&xev); */ + fprintf(stderr, "ButtonRelease event %d %d %d %d %d %d\n", + ButtonRelease, xev.type, + xev.xbutton.state, xev.xbutton.button , + xev.xbutton.x, xev.xbutton.y); + + /* push the event back onto the event queue if an object + * needs to be "unpushed". + */ + if (fl_pushobj && !button_down(xev.xbutton.state)) { + fprintf(stderr, "Dispatching...\n"); + XSendEvent(flx->display, flx->win, False, 0, &xev); + } + /* terminate popup if not on the title bar */ if (!is_on_title(m, xev.xbutton.x_root, xev.xbutton.y_root)) {