From owner-oi-users Mon Feb 27 13:59:26 1995 Return-Path: oi-users-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id NAA07998 for oi-users-outgoing; Mon, 27 Feb 1995 13:59:26 -0800 Received: from jpmorgan.jpmorgan.com (jpmorgan.jpmorgan.com [146.149.99.127]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id NAA07989 for ; Mon, 27 Feb 1995 13:59:20 -0800 Received: from tcpg01a.ny.jpmorgan.com by jpmorgan.jpmorgan.com (8.6.10/fma-120691.2); id QAA21750; Mon, 27 Feb 1995 16:57:32 -0500 Received: from newton.ny.jpmorgan.com (newton.ny.jpmorgan.com [146.149.2.33]) by tcpg01a.ny.jpmorgan.com (8.6.10/cjy.sub.1.0) with ESMTP id QAA24728 Received: from hawking.ny.jpmorgan.com (hawking.ny.jpmorgan.com [146.149.3.47]) by newton.ny.jpmorgan.com (8.6.9/8.6.9) with SMTP id QAA03064; Mon, 27 Feb 1995 16:57:31 -0500 Date: Mon, 27 Feb 1995 16:57:31 -0500 From: "Milo A. Chan" Message-Id: <199502272157.QAA03064@newton.ny.jpmorgan.com> To: pbeiler@fnma.COM Cc: oi-users@freefall.cdrom.com Subject: RE: Losing Focus Callback References: <9502271928.AA21016@sydney.fnma.com> Sender: oi-users-owner@FreeBSD.org Precedence: bulk You can push a fake FocusOut event for the previous object having focus back onto the X event queue. If you are using translations to define the user-callbacks, you could redefine the fire() action procedure for OI_menu_cell to do this. But a better way (according to Tom LaStrange), would be to send the fake FocusOut event from a pre-popup callback bound to the pulldown menus in the main menu. Here is a code frag which may help you get started: if (conp->has_focus() && is_main_menu() && connection()->last_focus()) { XEvent event; event.xfocus.type = FocusOut; event.xfocus.send_event = False; event.xfocus.display = connection()->display(); event.xfocus.window = connection()->last_focus()->x_window_id(); event.xfocus.mode = NotifyNormal; event.xfocus.detail = NotifyDetailNone; XPutBackEvent(connection()->display(), &event); } good luck, -Milo > From: Phillip Beiler on Mon, February 27, 1995 14:28 > Subject: Losing Focus Callback > Sent-To: uunet!freefall.cdrom.com!oi-users@uunet.uu.net, oi-support@boulder.openware.com > > > This is my last resort, oi-support seems to be on vacation!!!! > Thanks for any help... > > > I have a simple losing focus callback problem.... > > I have a bunch of fields in a box, and the box is parented to an > app window, which, has a motif style mainmenu ... simple... > > I get all the losing focus events when I tab between fields, mouse > out of the window, etc,..... > > However, when I click on the mainmenu bar and select an option (one motion, > without releasing the mouse), the menucell callback fires. After the menucell > callback returns, the losing focus callback fires.... > > Unfortunately for me, this is exactly the opposite of what I NEED... > > Without alot of explanation, the losing focus callbacks are in a library, and > the mainmenu bar (memucell) callbacks are the users. > > Do you have any suggestions on changing the callback firing order? > > Phil > ----------------------------------------------------------------------------- > Phil Beiler Federal National Mortgage Association > pbeiler@fnma.com Advanced Technologies > (202) 752-3667 Washington, D.C. 20016 > ----------------------------------------------------------------------------- -- Milo Chan, V.P. J.P. Morgan Securities, Inc. email: chan@jpmorgan.com ...or... chan@fractl.tn.cornell.edu