Sponsored by IST Limited
Formerly MW3: Motif on the World Wide Web [MW3 Logo]
Last Updated
November 18, 2002

X-Designer - The Leading X/Motif GUI Builder - Click to download a FREE evaluation
About the site
Bulletin Board
News Archive
OpenGroup News
Frequently Asked Questions
The Motif FAQ
X/Motif FAQs
General FAQs
Ask Antony
Latest Q & A
All Q & As
Submit Question
Tips & Pointers
Code Examples
Widget Sets
GUI Toolkits & Libraries
Motif suppliers
Non-commercial S/W
Commercial Software
Docs & Pubs
X/Motif Newsgroups
Feedback Form

How do I make my XmApplicationShell disappear?

11-Dec-01 15:00 GMT
How do I make my XmApplicationShell disappear? XtPopdown appears to have no effect.

This kind of functionality is often required when an application GUI needs to be visible initially and then slip into the background until some other event occurs that requires user interaction.

This behavior can be achieved using the XWithdrawWindow function the syntax for which is:

    XWithdrawWindow(display, w, screen_number)
    Display *display;
    Window w;
    int screen_number;
The values for the display, window and screen number arguments can be obtained using the XtDisplay, XtWindow and XscreenNumberOfScreen functions respectively. Syntax is as follows:
    Display *XtDisplay(w)
    Widget w;

    Window XtWindow(w)
    Widget w;

    int XScreenNumberOfScreen(screen)
    Screen *screen;

Assuming your ApplicationShell widget is named "MyAppShell" example code to hide the window is as follows:

     XWithdrawWindow ( XtDisplay (MyAppShell), XtWindow (MyAppShell),
		       XScreenNumberOfScreen(XtScreen(MyAppShell)) );

Obviously once you've withdrawn the window you are going to want to bring it back again at some point:

     XMapWindow ( XtDisplay (MyAppShell), XtWindow ( MyAppShell ));


Sponsored by X-Designer - The Leading X/Motif GUI Builder - Click to download a FREE evaluation


Goto top of page


[IST Limited]
IST Limited is the
proud sponsor of

Thanks to all the contributors to these pages.

Privacy Policy

"Motif" is a registered trademark of The Open Group. All other trademarks are the property of their respective owners.

Some articles/papers here have their own copyright notice. All other information is copyright ©1999-2008 IST Limited

[CommerceOne] MW3 site originally by Ken Sall of Commerce One (formerly Century Computing).