9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dave Edmondson davided@sco.com
Subject: 9wm: A Lightweight X Window Manager in the style of 8 1/2
Date: Mon, 12 Dec 1994 06:47:07 -0500	[thread overview]
Message-ID: <19941212114707.CPw9MRNGTOrOYV2q5nU237CHWsFzCaiwKlKodwBG7lk@z> (raw)

------- =_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--






             reply	other threads:[~1994-12-12 11:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-12 11:47 Dave [this message]
  -- strict thread matches above, loose matches on Subject: below --
1994-12-13  0:36 David
1994-12-12 17:22 Arnold
1994-12-12 11:28 Amos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19941212114707.CPw9MRNGTOrOYV2q5nU237CHWsFzCaiwKlKodwBG7lk@z \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).