Re: XForms: iconize / de-iconize

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 11 Jun 97 11:06:27 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> is there a function in xforms that determines whether a form has been
> minimized (iconized) and is there a way to maximize it ?
> I am sure this is possible but I just couldn't find it so I'd appreciate
> it if someone gave me a hint.

You can tell if a Window is mapped (which it will be if it is
uniconified, of course) with the following:

XWindowAttributes attributes;

XGetWindowAttributes( fl_get_display(),
FL_ObjWin( obj ),
&attributes );
if ( attributes.form->map_state == IsViewable )
do_viewable_stuff();
else
do_iconified_stuff();

There's no specific test in X to determine if a Window is iconified,
since this is under the control of the window manager. There is an
XIconifyWindow() function call you can make to request a window be
iconified.

This appears to be one of those things in X, like Colormap, background
Pixmap, and Cursor of a Window, that you can set but not query (I've
never understood *why* this is the case since the darned X server or,
in this case, the window manager *knows* -- I don't see why it can't
be queried).

spl

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/