Path: utzoo!attcan!uunet!cs.utexas.edu!usc!apple!bloom-beacon!AI.MIT.EDU!jla From: jla@AI.MIT.EDU (Joseph Arceneaux) Newsgroups: comp.windows.x Subject: XSetNormalHints behaviour Message-ID: <8906261820.AA00989@galapas.ai.mit.edu> Date: 26 Jun 89 18:20:16 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jla@wheaties.ai.mit.edu Organization: The Internet Lines: 31 A couple of months ago I ran into the problem of consecutive calls to XSetNormalHints obliterating the values I'd established in previous calls. Specifically, on the first call I'd set the size hints and if no other call to the funtion was made, those values remained in effect. However, I noticed that a second call to XSetNormalHints (with different flag values) would reset my previously initialized values. This situation led to the following code: if (prompting) /* Only set on the first call. */ size_hints.flags |= prompting; else /* Nasty kludge. */ { XSizeHints hints; XGetNormalHints (x_current_display, window, &hints); if (hints.flags & PSize) size_hints.flags |= PSize; if (hints.flags & PPosition) size_hints.flags |= PPosition; if (hints.flags & USPosition) size_hints.flags |= USPosition; if (hints.flags & USSize) size_hints.flags |= USSize; } XSetNormalHints (x_current_display, window, &size_hints); This seems to be rather aberrant behaviour. Has anyone noticed anything similar? Is this a feature or a bug? I've not retested this in a while, but I believe I was using R3 at the time I discovered this.