From pp@solace.mh.se Thu Nov 11 09:22:49 1993
Return-Path: <pp@solace.mh.se>
Received: by rocket (4.1/SMI-4.1)
	id AA06050; Thu, 11 Nov 93 09:22:41 EST
Received: from dront.solace.hsh.se (via dront.solace.mh.se) by relay2.UU.NET with SMTP 
	(5.61/UUNET-internet-primary) id AA11455; Thu, 11 Nov 93 09:22:03 -0500
Received: from localhost (pp@localhost) by dront.solace.hsh.se (8.5/8.1) id PAA00399; Thu, 11 Nov 1993 15:19:28 +0100
Date: Thu, 11 Nov 1993 15:19:28 +0100
From: "Mr. Per Persson" <pp@solace.mh.se>
Message-Id: <199311111419.PAA00399@dront.solace.hsh.se>
To: nation@rocket.sanders.com
In-Reply-To: <9311111326.AA05562@rocket> (message from Robert Nation on Thu, 11 Nov 93 08:26:13 -0500)
Subject: Re: fvwm patch 
Status: RO

Well here is the new patch. -e has to be the last option to xterm and as
the do_save() functions just added -geometry after the command_line all xterms
with the option -e didn't show up when u started X with .xinitrc.
This patch fixes that, it puts in the geometry stuff right after xterm if
the line has an xterm in it. In all other cases it puts -geometry at then end
of the line.
Same goes for -iconic stuff.
Any plans on coding a way to drag things into and out from the Pager?

Only in one dir: Makefile
diff configure.c
173a174
>   {"Save",         set_func,(char **)F_SAVE},
diff functions.c
462c462
<      case F_MAXIMIZE:
---
>     case F_MAXIMIZE:
467c467,471
< 
---
>       
>     case F_SAVE:
>       do_save();
>       break;
>       
Common subdirectories: fvwm_icons
diff parse.h
65a66
> #define F_SAVE			26
Common subdirectories: sample_configs
Common subdirectories: ynsupported_patches
diff windows.c
29a30,133
> 
> void do_save()
> {
>   int i;
>   MenuRoot *mr;
>   MenuItem *mi,*tmp;
>   FvwmWindow *t;
>   char tname[200];
>   char loc[30];
>   int dwidth,dheight;
>   FILE *out;
>   int command_count;
>   char **command_list;
>   int xtermline;
>   
>   mr=NewMenuRoot("Window List");
>   
>   sprintf(tname, "%s/new.xinitrc", getenv( "HOME" ) );
>   out = fopen( tname, "w+" );
>   
>   for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
>     {
>       tname[0]=0;
>       
>       dheight = t->frame_height - t->title_height - 2*t->boundary_width;
>       dwidth = t->frame_width - 2*t->boundary_width;
>       
>       if (t->hints.flags&(PMinSize|PBaseSize) 
>           && t->hints.flags & PResizeInc)
>         {
>           if (t->hints.flags & PBaseSize) 
>             {
>               dwidth -= t->hints.base_width;
>               dheight -= t->hints.base_height;
>             } 
>           else 
>             {
>               dwidth -= t->hints.min_width;
>               dheight -= t->hints.min_height;
>             }
>         }
>       
>       if (t->hints.flags & PResizeInc)
>         {
>           dwidth /= t->hints.width_inc;
>           dheight /= t->hints.height_inc;
>         }
>       sprintf(loc,"%d",dwidth);
>       strcat(tname, loc);
>       sprintf(loc,"x%d",dheight);
>       strcat(tname, loc);
>       if(t->frame_x >=0)
>         sprintf(loc,"+%d",t->frame_x);
>       else
>         sprintf(loc,"%d",t->frame_x);
>       strcat(tname, loc);
>       if(t->frame_y >=0)
>         sprintf(loc,"+%d",t->frame_y);
>       else
>         sprintf(loc,"%d",t->frame_y);
>       strcat(tname, loc);
>       
>       if ( XGetCommand( dpy, t->w, &command_list, &command_count ) )
>         {
>           for (i=0; i < command_count; i++)
>             {
>               if ( strncmp( "-geo", command_list[i], 4) == 0)
>                 {
>                   i++;
>                   continue;
>                 }
>               if ( strncmp( "-iconic", command_list[i], 7) == 0)
>                 continue;
>               fprintf( out, "%s ", command_list[i] );
>               if(strstr(command_list[i], "xterm"))
>                 {
>                   fprintf( out, "-geometry %s ", tname );
>                   if ( t->flags & ICON )
> 		    fprintf(out, "-iconic ");
> 		  xtermline = 1;
>                 }
>             }
>           if ( command_count > 0 )
>             {
>               if ( xtermline == 0 ) 
>                 {
> 		  if ( t->flags & ICON )
> 		    fprintf(out, "-iconic ");
>                   fprintf( out, "-geometry %s &\n", tname );
>                 }
>               else
>                 {
>                   fprintf( out, "&\n");
>                 }
>             }
>           XFreeStringList( command_list );
>           xtermline = 0;
>         }
>     }
>   fprintf(out, "fvwm\n");
>   fclose( out );
> }
> 
> 
Common subdirectories: xpmroot

Per Persson          ___      Pain had been my dearest friend.     ___
pp@solace.mh.se   ___\ /___     It was always there for me,     ___\ /___
+46 60 128815     \___ ___/       when my dreams crumbled       \___ ___/
Will I dream?         V           (The Stain - Confessor)           V

