How can I make any dialog
fullscreen, without any window manager
decorations and on top of all other applications?
|
8-Dec-00 12:00 GMT
|
This is supplementary to the question
How can I make a drawing area occupy the full screen size?
The solution to this is straightforward. To start with, you need to deduce the size of the
physical screen. This can be done simply enough: the Screen object has a width amd height
element to the structure.
We can get at the Screen object using XtScreen() from an arbitrary widget as follows:
Screen *screen = XtScreen(some_widget);
To make our dialog occupy the entire area, we set the width and height of the top level
manager under the shell to the data found in the screen object:
XtVaSetValues (top_manager,
XmNwidth, screen->width,
XmNheight, screen->height,
NULL);
The next problem is to get rid of window manager interaction.
This can be done at a stroke: we set the XmNoverrideRedirect
resource of the top level shell to TRUE: this should be performed before
the shell is realized:
XtVaSetValues (top_shell, XmNoverrideRedirect, TRUE, NULL);
Lastly, after we have called XtRealize() on our top level shell,
we make sure the window is on top using XRaiseWindow():
XRaiseWindow (XtDisplay(top_shell), XtWindow(top_shell));
Sponsored
by X-Designer - The Leading X/Motif GUI Builder
- Click to download a FREE evaluation
Goto top of page
|