🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36616

Re: XtSetKeyboardFocus

#36616
From: Ralph R. Swick
Date: Fri, 09 Feb 1990 16:05
19 lines
1249 bytes
    I suspect I've found a problem with XtSetKeyboardFocus.

Yep, you have.

    This bug appears to be present in the X11-R4beta release.

And in the R4 release bits, even though this code was substantially
re-worked after beta (I'll not say by whom, to protect the guilty :-(.

The problem occurs when setting the keyboard focus for an unrealized
descendant of a realized shell.  I can't think of an easy work-around,
except to make sure the descendant is realized before calling
XtSetKeyboardFocus.  Unfortunately in the example you provided,
the call is internal to the Dialog widget so you've not much choice.

If you need a quick fix, add "&& XtIsRealized(widget)" to the
outermost conditional around the block of code in AddFocusHandler().
An official patch will be forthcoming.
Technical Details
Message-ID: <9002091605.AA08141@lyre.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!yale!mintaka!bloom-beacon!ATHENA.MIT.EDU!swick
References: <7898@pt.cs.cmu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!yale!mintaka!bloom-beacon!ATHENA.MIT.EDU!swick
From: swick@ATHENA.MIT.EDU (Ralph R. Swick)
Newsgroups: comp.windows.x
Subject: Re: XtSetKeyboardFocus
Message-ID: <9002091605.AA08141@lyre.MIT.EDU>
Date: 9 Feb 90 16:05:13 GMT
References: <7898@pt.cs.cmu.edu>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: DEC/MIT Project Athena
Lines: 19