[linux] Help please;Ako donutit Window manager aby nezobrazoval title bar...

peter Fodrek fodrek na kasr.elf.stuba.sk
Úterý Říjen 29 23:04:55 CET 2002


----- Original Message -----
From: peter Fodrek
To: linux na lists.linux.sk
Sent: Tuesday, October 29, 2002 4:50 AM
Subject: [linux] Help please;Ako donutit Window manager aby nezobrazoval
title bar...


>Vazeny Linux/X-win experti!
>
>Nevie mi niekto poradit ako donutit X-window aplikaciu, aby nedovaolia
window manageru pridat k nej title bar?
>
>Robim toztiz aplikaciu ktora vyuziva full screen obrazovka a nie je ziaduce
aby sa title bar zobrazil.. Na druhej strane ale potrebujem vyuzivat pri
popup oknach >sluzby window managera...
>Skusal som atribut XtoverrideRedirect na TRUE, ale nepomohlo...  v
instanciii triedy ApplicationShell ako aj v jej podobjekte...
>
>
>Nevie mi niekto poradit?  Najradsej nie priadanim full screen popup okna...
To asi nebude "to prave orechove"

Diki kazdemu kto si to aspon precital...
Ide mi konkretne o nieco takmer ako toto, avsak nie len pre Mwm, ale
nezavisle na Window manager-i...
S pozdravom
Peto

TOTO:
Configuring the Window Manager Decorations
Firstly, the window manager decorations are controlled through the
XmNmwmDecorations resource of the shell. This is a mask formed by combining
the following values:

    #include <Xm/MwmUtil.h>

    MWM_DECOR_ALL
    MWM_DECOR_BORDER
    MWM_DECOR_MINIMIZE
    MWM_DECOR_MAXIMIZE
    MWM_DECOR_TITLE
    MWM_DECOR_MENU
    MWM_DECOR_RESIZEH

For example, to remove the maximize and minimize buttons, the following code
will do the trick:

    extern Widget shell;

    XtVaSetValues (shell,
       XmNmwmDecorations,
       MWM_DECOR_ALL | MWM_DECOR_MAXIMIZE | MWM_DECOR_MINIMIZE,
       NULL);

Configuring the Window Manager Menu
Secondly, the contents of the menu is controlled through the XmNmwmFunctions
resource of the shell. This is also a mask, formed from the following
values:

    #include <Xm/MwmUtil.h>

    MWM_FUNC_ALL
    MWM_FUNC_RESIZE
    MWM_FUNC_MOVE
    MWM_FUNC_MINIMIZE
    MWM_FUNC_MAXIMIZE
    MWM_FUNC_CLOSE

For example, the following code removes the Close option from the menu:

    extern Widget shell;

    XtVaSetValues (shell,
 XmNmwmFunctions,
 MWM_FUNC_ALL | MWM_FUNC_CLOSE,
 NULL);

Note that in the specified question requirements, you probably also want to
remove the menu maximize/minimize options for consistency, otherwise the
user can still maximize/minimize the application using the menu options,
even though you have removed the window manager decoration buttons. The
following code also removes the maximize, minimize menu entries:

    extern Widget shell;

    XtVaSetValues (shell,
 XmNmwmFunctions,
 MWM_FUNC_ALL | MWM_FUNC_CLOSE |
 MWM_FUNC_MAXIMIZE | MWM_FUNC_MINIMIZE,
 NULL);






Další informace o konferenci linux