Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!agate!ucbvax!lta.com!david From: david@lta.com (David B. Lewis) Newsgroups: comp.windows.x.motif Subject: mwm decorations Message-ID: <9011191426.AA09153@lta.com> Date: 19 Nov 90 14:26:16 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 80 In article <1990Nov18.095526@lbl.gov>, ctday@lbl.gov (Christopher T. Day) writes: |> H'mm. My Motif (ICS version 1.0.3) seems to have the opposite parity on the |> decoration bits from yours. The example you give has only the resize handles |> REMOVED. If I use MWM_DECOR_ALL, all the decorations are ADDED, not removed |> as the Programmer's Guide suggests. If I use |> |> MWM_DECOR_RESIZEH | MWM_DECOR_MENU | MWM_DECOR_MINIMIZE | |> MWM_DECOR_MAXIMIZE | MWM_DECOR_TITLE |> |> then I get ONLY the border. Is there a definitive statement somewhere as to |> which parity is correct? I missed the original posting, but I believe the former is correct. Most versions of 1.0.3 suffer from a flaw in mwm code which miscompares the functions and decorations fields; the bug appears in the case in which the functions do not coincidentally match. ICS submitted a fix against 1.0.2 in February to correct this problem and a problem with mwm's resetting of its internal fields; but it was not fully applied to the 1.0.3 release. For those keeping track, this should be part of fix #931. Motif 1.1 has the correct code. *** /tmp/WmWinInfo.c Fri Nov 16 18:43:25 1990 --- WmWinInfo.c Fri Nov 16 18:45:16 1990 *************** *** 2902,2922 **** else { /* client indicating applicable functions */ pCD->clientFunctions &= pHints->functions; } /* !!! check for some minimal level of functionality? !!! */ } if (pHints->flags & MWM_HINTS_DECORATIONS) { ! if (pHints->functions & MWM_DECOR_ALL) { /* client indicating decorations to be removed */ pCD->clientDecoration &= ~(pHints->decorations); } else { /* client indicating decorations to be added */ pCD->clientDecoration &= pHints->decorations; } --- 2902,2922 ---- else { /* client indicating applicable functions */ pCD->clientFunctions &= pHints->functions; } /* !!! check for some minimal level of functionality? !!! */ } if (pHints->flags & MWM_HINTS_DECORATIONS) { ! if (pHints->decorations & MWM_DECOR_ALL) { /* client indicating decorations to be removed */ pCD->clientDecoration &= ~(pHints->decorations); } else { /* client indicating decorations to be added */ pCD->clientDecoration &= pHints->decorations; } -- David B. Lewis Lewis, Trachtenberg & Associates (LTA) +1 617 225 0366 Note new address!: david@lta.com (Real Soon Now) david%lta.uucp@uunet.uu.net (Works for Now)