From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 12 Dec 1994 06:47:07 -0500 From: Dave Edmondson davided@sco.com Subject: 9wm: A Lightweight X Window Manager in the style of 8 1/2 Topicbox-Message-UUID: 056f78b0-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19941212114707.CPw9MRNGTOrOYV2q5nU237CHWsFzCaiwKlKodwBG7lk@z> ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27918.787232825.1@sco.com> : 9wm is particularly handy for users who are constantly moving back : and forth between Plan 9 and X windows i wish i had this problem. 9wm works well for me, with two problems: - if i use a proportionally spaced font the menus are a bit wild, - i have a two-headed display. 9wm doesn't deal with two displays (which i can live with - i just run two 9wm's), but a bigger problem is that selecting a window on one screen causes a grab on the display, so that if i move my mouse to the other screen it _looks_ as though i have selected a window (border is dark), but the `other' 9wm has grabbed the keyboard focus. i have to select another window on the new screen and then go back to the one i really want. did i explain that right ? hmm. sounds more complicated than it actually is. anyway, here's a patch for the first problem: ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27918.787232825.2@sco.com> Content-Description: grab.c diffs *** 1.1 1994/12/12 11:34:52 --- 1.2 1994/12/12 11:41:19 *************** *** 66,74 **** return -1; dx = 0; for (n = 0; m->item[n]; n++) { ! wide = strlen(m->item[n]) * font->max_bounds.width + 4; if (wide > dx) dx = wide; } wide = dx; --- 66,74 ---- return -1; dx = 0; for (n = 0; m->item[n]; n++) { ! wide = XTextWidth(font, m->item[n], strlen(m->item[n])) + 4; if (wide > dx) dx = wide; } wide = dx; *************** *** 163,171 **** XFillRectangle(dpy, menuwin, gc, 0, cur*high, wide, high); break; case Expose: for (i = 0; i < n; i++) { ! tx = (wide - strlen(m->item[i])*font->max_bounds.width)/2; ty = i*high + font->ascent + 1; XDrawString(dpy, menuwin, gc, tx, ty, m->item[i], strlen(m->item[i])); } if (cur >= 0 && cur < n) --- 163,171 ---- XFillRectangle(dpy, menuwin, gc, 0, cur*high, wide, high); break; case Expose: for (i = 0; i < n; i++) { ! tx = (wide - XTextWidth(font, m->item[i], strlen(m->item[i]))) / 2; ty = i*high + font->ascent + 1; XDrawString(dpy, menuwin, gc, tx, ty, m->item[i], strlen(m->item[i])); } if (cur >= 0 && cur < n) ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27918.787232825.3@sco.com> great work ! dave. -- Dave Edmondson, The Santa Cruz Operation, davided@sco.com How many retired bricklayers from FLORIDA are out purchasing PENCIL SHARPENERS right NOW?? ------- =_aaaaaaaaaa0--