🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36815

Re: XtSetKeyboardFocus

#36815
From: Gabe Begeddov
Date: Sun, 11 Feb 1990 22:44
35 lines
2158 bytes
   / hpcvlx:comp.windows.x / swick@ATHENA.MIT.EDU (Ralph R. Swick) /  8:05 am  Feb  9, 1990 /
Sorry about the spurious duplicate reply. My mail karma is low...

       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 :-(.
   
As the "guilty party" I tried the program and also went back over the archive
of the final stages of the R4 release when this code was being completed.
It turns out that the last sources I sent to Ralph had this bug fixed but it
got dropped on the floor during integration and some other fixes Ralph made ?.
So in this instance I'm almost innocent :-). 
   
   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.

Actualy, I think the problem is a redundant call to AddFocusHandler in 
XtSetKeyboardFocus that should be conditional on the descendant being 
realized, but either way I still think your code is suspect. 

When I tried it with a fix in Xt, it mapped the dialog over the button
without the box trying to grow to accomadate the dialog. This is due to 
the fact that you explicitly map the dialog without managing it or unmanaging
the button. This assumes that what you want is to have the dialog replace the
button in the box. if what you want is to have the dialog popup in a separate 
window then you need a shell as it's parent rather than the box in the primary
hierarchy.

Gabe Beged-Dov
Interface Technology Operation
Hewlett-Packard
   ----------
Technical Details
Message-ID: <100920165@hpcvlx.cv.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!purdue!decwrl!shelby!unix!hplabs!hp-sdd!hp-pcd!hpcvlx!gabe
References: <7898@pt.cs.cmu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!purdue!decwrl!shelby!unix!hplabs!hp-sdd!hp-pcd!hpcvlx!gabe
From: gabe@hpcvlx.cv.hp.com (Gabe Begeddov)
Newsgroups: comp.windows.x
Subject: Re: XtSetKeyboardFocus
Message-ID: <100920165@hpcvlx.cv.hp.com>
Date: 11 Feb 90 22:44:35 GMT
References: <7898@pt.cs.cmu.edu>
Organization: Hewlett-Packard Co., Corvallis, OR, USA
Lines: 35