Path: utzoo!attcan!uunet!kddlab!titcca!sragwa!sravd.sra.JUNET From: erik@sravd.sra.JUNET (Erik M. van der Poel) Newsgroups: comp.windows.x Subject: Re: keybord focus in libXaw Message-ID: <1283@sragwa.sra.JUNET> Date: 21 Nov 89 12:46:32 GMT References: <8911202222.20499@munnari.oz.au> Sender: news@sragwa.sra.JUNET Reply-To: erik@sra.co.jp (Erik M. van der Poel) Organization: Software Research Associates, Inc., Japan Lines: 70 In article <8911202222.20499@munnari.oz.au> munnari!arp.anu.OZ.AU!gustav@uunet.uu.net writes: > However, > when I try to close the window by pressing the "close window" command > button, the window takes the keyboard focus with it, and it cannot be > transferred to the main command panel, unless the pop-up window is popped > up again. Here are a couple of work-arounds: 1. NoTitleFocus If you use twm, setting NoTitleFocus in your .twmrc may solve the problem. Advantage: This is very simple. Disadvantage: If you are distributing your application, you will need to tell your end-users about this too, so this solution is unreliable. (End-users are inherently unreliable. :-) 2. X Toolkit Apply the appended unofficial patch in lib/Xt. Advantage: This is reliable, because it gets compiled into your application. Disadvantage: You have to find and compile lib/Xt. *** /tmp/,RCSt1007774 Tue Nov 21 20:59:14 1989 --- Event.c Tue Nov 21 20:58:48 1989 *************** *** 864,871 **** "grabError","xtRemoveGrab","XtToolkitError", "XtRemoveGrab asked to remove a widget not on the list", (String *)NULL, (Cardinal *)NULL); } ! return False; } if (keyboard_focus) { --- 864,883 ---- "grabError","xtRemoveGrab","XtToolkitError", "XtRemoveGrab asked to remove a widget not on the list", (String *)NULL, (Cardinal *)NULL); + return False; } ! else { ! if (focusList) { ! /* ! * If there is an attempt to remove a widget that is ! * not on the list, assume that we really want to ! * remove one that IS on the list. ! */ ! gl = focusList; ! } else { ! return False; ! } ! } } if (keyboard_focus) {