[NTLUG:Discuss] How to take off the window's decoration??

xiao li xiaoli4uh at hotmail.com
Fri Jan 10 09:33:49 CST 2003


Hi guys,
I find the problem!
If I just set the hints.decorations = 0; then I can get rid of the 
decoration. But if I use hints.decorations = MWM_DCOR_ALL | MWM_DECOR_BORDER 
| MWM_DECOR_TITLE...; then it won't work on linux.
Thanks for you guys.

Lei Yu

>From: kbrannen at gte.net
>Reply-To: discuss at ntlug.org
>To: discuss at ntlug.org
>Subject: Re: [NTLUG:Discuss] How to take off the window's decoration??
>Date: Thu, 09 Jan 2003 12:54:05 -0600
>
>xiao li wrote:
>>Hi Steve,
>>I use the same cose as you did. But it doesn't work!?
>>So I wonder is there configuration problem I need to do??
>>Thanks anyway.
>...
>>>I've had success with code like this - it works under KDE and GNOME - I
>>>havn't tested it on any of the others:
>>>
>>>-------------------------------------------------------------------------------
>>>
>>>   PropMotifWmHints motif_hints ;
>>>   Atom             prop, proptype ;
>>>
>>>   /* Set up the property */
>>>
>>>   motif_hints.flags = MWM_HINTS_DECORATIONS ;
>>>   motif_hints.decorations = 0 ;   /* NO DECORATIONS */
>>>
>>>   /* get the atom for the property */
>>>
>>>   prop = XInternAtom ( disp->getDisplay(), "_MOTIF_WM_HINTS", True ) ;
>>>
>>>   if ( prop == 0 )
>>>     return ;
>>>
>>>   /* not sure this is correct, seems to work, XA_WM_HINTS didn't work */
>>>
>>>   proptype = prop ;
>>>
>>>   XChangeProperty( disp->getDisplay(), Handle,
>>>                    prop, proptype,                 /* property, type */
>>>                    32,                             /* format: 32-bit 
>>>datums */
>>>                    PropModeReplace,                /* mode */
>>>                    (unsigned char *) &motif_hints, /* data */
>>>                    PROP_MOTIF_WM_HINTS_ELEMENTS    /* nelements */
>>>                  ) ;
>>>--------------------------------------------------------------------------------
>
>Here's some code I used to use.  Note that it's very similiar to Steve's, 
>but it is slightly different.  Also note that I haven't used this in away, 
>so it may not work for you.  And as you can also see, I used to hard code 
>some of the values, you may not want those defaults.
>
>As has been pointed out, but probably should be reinterated, a window 
>manager doesn't have to obey this, they are only hints.  However, mwm was 
>pretty good about always taking the hint. (bada bing bada boom! :-)
>
>Good Luck!
>Kevin
>
>
>void xMwmShellDecor(Widget w, int decorations)
>{
>
>         PropMwmHints  prop;
>         Atom          atom;
>
>         atom = XmInternAtom(XtDisplay(w), _XA_MWM_HINTS, False);
>
>         prop.flags        = MWM_HINTS_DECORATIONS | MWM_HINTS_FUNCTIONS;
>         prop.functions    = MWM_FUNC_MINIMIZE | MWM_FUNC_MOVE;
>         prop.decorations  = decorations
>                             ? decorations
>                             : (MWM_DECOR_BORDER | MWM_DECOR_TITLE);
>         prop.inputMode    = 0L;
>
>         XChangeProperty(XtDisplay(w), XtWindow(w),
>                         atom, atom, 32, PropModeReplace,
>                         (unsigned char *)&prop, PROP_MWM_HINTS_ELEMENTS);
>}
>
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail





More information about the Discuss mailing list