I am to program full screen application and there is problem when displayed
title bar at the top of the window.. I am to disable Window manager to
display title bar, but I am not to disable window manager ..
Can any one help me,please?
Thank you for any help...
Yours faitfully
Peter Fodrek
>I am to program full screen application and there is problem when displayed
>title bar at the top of the window.. I am to disable Window manager to
>display title bar, but I am not to disable window manager ..
It seems like you understand that it is the window manager which
adds decoration to widows including title bar. Your question can
not be answered without knowing which window manager you are using.
I use lwm and I don't think there is an simple way of configuring
it to not add a title bar. However it would not be too difficult to
modify the source.
Can you tell us why you need to run a window manager? I would have
thought that it most cases the sort of application which would
require running full screen with no title bar would also be better
off running without the added complexity or overhead of a window
manager.
--
Ian Gregory
Systems and Applications Manager
Learning and Information Services
University of Hertfordshire
Thank you for answer I am to use twm or mwm or at least fvwm as window
manager... I do not need any more complex window manager...
> Can you tell us why you need to run a window manager?
Application need not to have mouse or other pointer device to set commands..
It is needed to send all commands from user to the application via keyboard
only...
And when user is to control popup window. It is imposible to do so with
keyboard only when no window manager is active... When no window maanger is
no active then the popup window is no "active" as I see...
Thank you again...
Yours faithfully
Peter Fodrek
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);
For fvwm, use:
Style <windowname> NoTitle
For twm, this might work:
NoTitle {
<windowname>
}
I'm not sure it can be done with mwm.
When you are running an X server any X client can use the mouse -
you don't have to be running a window manager. So you could write
your application to deal with mouse events, manage popups etc itself.
However, I have never done anything like this so I don't know how
difficult it is. Perhaps it is not worth the effort for you and it
is easier to make use of the code in the window manager to do some
of it for you. I leave it to the experts to carry on this thread.
Thank you to all trying help me..
But PC which is virtual X-server have not mouse physicaly connected. It is
prohibited to me to program X-Window which uses mouse...
I need to handle events only from keyboard... And without wm is problem to
program application which uses only keyborad to handle popup window (Linux
kernel 2.0.35-neded 2.03x- and XFree86 3.3.6)
but I was soluted this problem using mwm... as show in my next article in
this thread...
Thank you again
Yours faitfully
Peter
XSetWindowAttributes xswa;
xswa.override_redirect = True;
XChangeWindowAttributes(p_display, window, CWOverrideRedirect, &xswa);
Cheers,
Mike
Ian Gregory (i.h.g...@herts.ac.uk) wrote:
I will try..
Thank you for your help...