Subject: fvwm2 and iconboxes patch

From: Andrew Veliath <[email-masked]>
Date: Tue, 02 Dec 1997 12:20:38 -0500

Hello everyone,

I'm having a bit of trouble with the RedHat version of fvwm2.  They
added a *lot* of patches to it, but AFAIK I think it has to do with
the iconboxes patch, since I tried compiling original and it happened
just with that patch, but the one from the RedHat 5.0 SRPM.

It seems to somehow break my existing configuration with UseStyle, but
I did not debug it (not much time).

Pertinent rc code is here:
# Decor for mini title bar windows
AddToDecor "Small Window"
+ WindowFont SMALLWINDOWFONT
+ ButtonStyle 3 13 26x29@1 34x21@1 50x35@1 70x21@1 79x29@1 63x48@0 79x65@1 70x75@0 50x61@0 34x75@0 26x65@0 44x48@1 26x29@0
+ ButtonStyle 6 12 50x10@1 25x35@1 40x35@1 40x60@1 25x60@1 50x85@1 75x60@0 60x60@0 60x35@0 75x35@0 50x10@0 50x10@1
Style "Small Window" UseDecor "Small Window",MWMBorder,HandleWidth 5,BorderWidth 5

Style "XTerm"		UseStyle "Small Window",SloppyFocus,Icon xterm.xpm,HandleWidth 5
Style "FvwmConsole"	UseStyle "XTerm"

I seem to lose the small window for my xterms and rxvts.  If I can
debug it some time I'll post a patch.  The IconBoxes patch btw, is
nice otherwise though.

--
Regards,
Andrew Veliath
[email-masked], [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].

---

From: Dan Espen <[email-masked]>
Date: Tue, 02 Dec 1997 13:26:06 -0500

Andrew Veliath <[email-masked]> writes:
> + ButtonStyle 3 13 26x29@1 34x21@1 50x35@1 70x21@1 79x29@1 63x48@0 79x65@1 70
> x75@0 50x61@0 34x75@0 26x65@0 44x48@1 26x29@0

I can reproduce the problem,  although when I  looked at the code, the
cause  wasn't obvious.    I  hope to  get some  time  to look  at this
tonight.

Stay tuned.

--
Dan Espen                                Phone: (732) 699-5570
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].

---

From: Dan Espen <[email-masked]>
Date: Tue, 02 Dec 1997 23:04:59 -0500

> debug it some time I'll post a patch.  The IconBoxes patch btw, is

The iconboxes patch made the UseStyle command not work.
Here is a patch to the iconboxes patch to fix the problem:

*** fvwm/style.c.orig   Tue Dec  2 22:47:23 1997
--- fvwm/style.c        Tue Dec  2 22:53:55 1997
***************
*** 723,730 ****
--- 723,733 ----
              for ( nptr = Scr.TheList; nptr; nptr = nptr->next ) {
                if (!mystrncasecmp(restofline,nptr->name,len)) { /* match style\
 */
                  if (!hit) {             /* first match */
+                   char *save_name;      /* place to save name */
+                   save_name = tname.name; /* save the name */
                    memcpy(&tname, nptr, sizeof(name_list)); /* copy everything\
 */
                    tname.next = 0;       /* except the next pointer */
+                   tname.name = save_name; /* and the name */
                    hit = 1;              /* set not first match */
                  } else {                /* subsequent match */
                    tname.off_flags     |= nptr->off_flags;