clyde@ut-emx.UUCP (Head UNIX Hacquer) (07/19/88)
Well, I started exploring XMH (since the X11R2 xbiff is pretty useless
compared to the X10 xbiff OR mailtool), and found much to my annoyance that
I could not get it to go where I wanted it to on my screen.
XMH does a lot of things, but it did not do 'IconGeometry'. So I fixed it
(with liberal swiping from xterm). Below is a patch file which should
teach your very own XMH to ask where to put its' icon:
--------- cut ------- slash ----------- slit ------------- chop -------
*** clients/xmh/init.c.r1.1 Mon Jul 18 14:16:52 1988
--- clients/xmh/init.c Mon Jul 18 14:16:53 1988
***************
*** 30,35 ****
--- 31,38 ----
#include "xmh.h"
+ static char *IconGeometry = NULL;
+
extern char* _XLowerCase();
/* Xmh-specific resources. */
***************
*** 66,71 ****
--- 69,76 ----
(Cardinal)&SkipCopied, XtRBoolean, (caddr_t)&defFalse},
{"hideboringheaders", "HideBoringHeaders", XtRBoolean, sizeof(Boolean),
(Cardinal)&defHideBoringHeaders, XtRBoolean, (caddr_t)&defTrue},
+ {"icongeometry", "IconGeometry", XtRString, sizeof(char *),
+ (Cardinal)&IconGeometry, XtRString, NULL},
{"geometry", "Geometry", XtRString, sizeof(char *),
(Cardinal)&defGeometry, XtRString, NULL},
{"tocgeometry", "TocGeometry", XtRString, sizeof(char *),
***************
*** 210,215 ****
--- 215,233 ----
defPickGeometry = FixUpGeometry(defPickGeometry,
rootwidth / 2, rootheight / 2);
+ if (IconGeometry != NULL) {
+ int junk, scrn;
+ Arg xa[2];
+
+ for (scrn = 0;
+ XtScreen(toplevel)!=ScreenOfDisplay(XtDisplay(toplevel),scrn);
+ scrn++);
+ xa[0].name = XtNiconX;
+ xa[1].name = XtNiconY;
+ XGeometry(XtDisplay(toplevel), scrn, IconGeometry, "", 0, 0, 0, 0, 0,
+ &xa[0].value, &xa[1].value, &junk, &junk);
+ XtSetValues(toplevel, xa, 2);
+ }
numScrns = 0;
scrnList = (Scrn *) XtMalloc((unsigned) 1);
LastButtonPressed = NULL;
--
Shouter-To-Dead-Parrots @ Univ. of Texas Computation Center; Austin, Texas
clyde@emx.utexas.edu; ...!ut-sally!ut-emx!clyde
"That would be the easy way, but it wouldn't be The Cowboy Way."
-Riders in the Sky