[comp.windows.x] twm ignores my hints? sounds anti-social ...

jordan@morgan.COM (Jordan Hayes) (10/20/90)

I have a transientShell that I "freeze" after getting the first
visibilityChange event after popup by using the following code:

----- cut here

static void
DoFreeze(w)
	Widget	w;
{
	int		ArgIndex;
	Arg		sArgs[25];
	Dimension	W, H;
	XSizeHints	h;

	ArgIndex = 0;
	XtSetArg(sArgs[0], XtNheight, (XtArgVal)&H); ArgIndex++;
	XtSetArg(sArgs[1], XtNwidth, (XtArgVal)&W); ArgIndex++;
	XtGetValues(w, sArgs, ArgIndex);

	h.flags = PMaxSize|PMinSize;
	h.max_width = h.min_width = W;
	h.max_height = h.min_height = H;

	XSetWMNormalHints(XtDisplay(w), XtWindow(w), &h);
	XtRemoveEventHandler(w, VisibilityChangeMask, FALSE, DoFreeze, NULL);
}

void
FreezeSize(w)
	Widget	w;
{
	XtAddEventHandler(w, VisibilityChangeMask, FALSE, DoFreeze, NULL);
}

----- cut here

This works great.  However, if I f.zoom the window, twm ignores my
hints and zooms the window.  I'm mad.  Anyone have a fix?  Do other
window managers do this?  I know they are *hints* but it sure would be
nice if twm were nicer about it ...

/jordan