[NTLUG:Discuss] How to take off the window's decoration??
Steve Baker
sjbaker1 at airmail.net
Wed Jan 8 22:45:28 CST 2003
Chris Cox wrote:
> xiao li wrote:
>
>>
>> Hi, there,
>>
>> The second question is I wrote a program using motif. In this program,
>> I can
>> take off the window's decoration. It works fine on Solaris 7 or 8. But
>> it doesn't work on RedHat Linux 7.3?? How can I set up the window
>> manager to make it work??
>
>
> Have you tried using mwm as the window manager?
> There are no standards for what commands a window manager has
> to honor or not honor.
>
> I'm assuming that it's gnome and whatever wm it uses (sawfish?).
> Not sure how to remove the window decoration on that one.
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 */
) ;
--------------------------------------------------------------------------------
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net> WorkEmail: <sjbaker at link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
More information about the Discuss
mailing list