FVWM: FvwmCascade

From: Rui Monteiro <ruimt_at_mail.telepac.pt>
Date: Mon, 17 Nov 1997 14:10:26 +0000

I've made a simple enhancement to FvwmCascade.
The idea is to have the windows constraints to the screen
without resizing them. So if the window slip out of the screen just
begin again in the top or the left (never tryed with flag -desk).
This should be usefull if you have many (>15) windows in one screen.

we now have two more options:
 -mcols : multiple columns
 -mlins : multiple lines

(maybe the name of the options can be changed)

Hope it's usefull. Hope this is the wright way to do these things.

-- 
Rui Monteiro
####################################################################
--- FvwmCascade.c.orig  Mon Nov 17 13:20:13 1997
+++ FvwmCascade.c       Mon Nov 17 13:25:37 1997
_at_@ -58,6 +58,7 @@
 int resize = 0, nostretch = 0, sticky = 0;
 int flatx = 0, flaty = 0;
 int incx = 0, incy = 0;
+int mlins = 0, mcols = 0;
 
 void insert_window_list(window_list *wl, window_item *i)
 {
_at_@ -200,12 +201,23 @@
 {
     char msg[128];
     int cur_x = ofsx, cur_y = ofsy;
+       int maxx = (maxw ? maxw : dwidth);
+       int maxy = (maxh ? maxh : dheight);
     window_item *w = reversed ? wins_tail : wins;
     while (w)
     {
        unsigned long nw = 0, nh = 0;
        if (raise_window)
-           SendInfo(fd,"Raise",w->frame);
+               SendInfo(fd,"Raise",w->frame);
+       if( mcols && 
+               ((cur_y+w->height)>maxy) )
+         {
+               cur_y = ofsy;
+         }
+       if( mlins && ((cur_x+w->width)>maxx) )
+         {
+               cur_x = ofsx;
+         }
        sprintf(msg, "Move %up %up", cur_x, cur_y);
        SendInfo(fd,msg,w->frame);
        if (resize) {
_at_@ -246,6 +258,12 @@
     {
        if (!strcmp(argv[argi],"-u")) {
            untitled = 1;
+       }
+       else if (!strcmp(argv[argi],"-mlins")) {
+           mlins = 1;
+       }
+       else if (!strcmp(argv[argi],"-mcols")) {
+           mcols = 1;
        }
        else if (!strcmp(argv[argi],"-t")) {
            transients = 1;
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon Nov 17 1997 - 08:14:50 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST