Subject: pager w/ more visible separators

From: Elliot Sowadsky <[email-masked]>
Date: Tue, 30 Oct 2001 13:41:41 -0800 (PST)

I got tired of not being able to see the separators between pages that had no visible root, so i hacked FvwmPager to keep windows away from separators.

Basically i widen the separator. shift all windows to the right, and cut
back on the size of windows hitting the right edge of page.

The changes might not be 100%, but you might want to integrate this in some
form.

  if (size < MinSize) size = MinSize;
  if (1) {
    /* this mini-window has to be grown to be visible
     * which way it grows depends on some magic:
     * normally it will grow right but if the window is on the right hand
     * edge of a page it should be grown left so that the pager looks better */

    /* work out the page that the right hand edge is on */
    page = virt / Scr.MyDisplayWidth;

    /* if the left edge is on the same page then possibly move it left */
    if (page == ((virt - t->width + 1) / Scr.MyDisplayWidth)) {
      /* calculate how far the mini-window right edge overlaps the page line */
      /* beware that the "over" is actually one greater than on screen, but
         this discrepancy is catered for in the next two lines */
      over = edge + size - ((page + 1) * win_w * Scr.MyDisplayWidth) /
	Scr.VWidth;

      /* if the mini-window right edge is beyond the mini-window pager grid */
      over+=2;  /* leave room for separator */
      if (over > 0) {
        /* move it left by the amount of pager grid overlap (!== the growth) */
        /*edge -= over; */
        size -= over;  /* keep win away from separator */
      }
    }
  else size -= 2;  /* maximized win */
  }
  /* fill in return values */
  *x_ret = edge + 1;  /* keep win away from separator */

     gcv.line_width = 3;
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]