| I missed that he wasn't using the shell - still, XMapRaised is
preferable because it will also de-iconify the window if it is
iconified. At least, it will if you're running an ICCCM-compliant
window manager such as the Motif window manager - the default
Digital window manager requires a little more (specifically,
setting the XSetWMHints initial_state field to NormalState).
Mike
|
| re: .3,
Yes, one of the things I want to do is to be able to iconify and de-iconify
certain windows of the application procedurally. Any hints would be most
welcome, as would words of wisdom on how to set the cursor to various
shapes when the enter/leave the applications windows. I understand how to
do it in raw X, but I don't know if the DECWindows WM will frustrate the
"straight forward" incantations and require special magic.
- norm
|
| The ICCCM (Inter-Client Communication Conventions Manual) states how to
iconify/deiconify a window while running an ICCCM-compliant window
manager (e.g. mwm, gwm, twm as released with X11R4, but *not* the XUI
window manager).
To deiconify a window, map it with XMapWindow. To iconify a window,
send a client message to the root window with type set to the atom for
"WM_CHANGE_STATE" and window set to the window you want to iconify.
Here's a code fragment from xrooms that should give you the idea:
if (debug)
fprintf(stderr, "iconifying %x\n", app->client);
event.xclient.type = ClientMessage;
event.xclient.display = dpy;
event.xclient.window = app->client;
event.xclient.message_type = WM_CHANGE_STATE;
event.xclient.format = 32;
event.xclient.data.l[0] = IconicState;
XSendEvent(dpy, RootWindowOfScreen(scrn), False,
SubstructureRedirectMask |
SubstructureNotifyMask,
&event);
To iconify/deiconify a window with the XUI window manager, you want to
change the initial_state field in the WMHints property. Again, a code
fragment:
XWMHints wmh;
wmh.flags = StateHint;
wmh.initial_state = IconicState;
XSetWMHints(dpy, win1, &wmh);
|