Re: FVWM: mwm like icons?

From: Dan Espen <dane_at_bae.bellcore.com>
Date: Wed, 28 May 1997 12:05:45 -0400

Richard Lister <ric_at_giccs.georgetown.edu> writes:
> On Wed, 28 May 1997 10:28:37 -0400
> Dan Espen <dane_at_bae.bellcore.com>
> wrote concerning 'Re: FVWM: mwm like icons? ':
>
> > > Style "*" IconBox +700 +0 -0 +200
> >
> > fvwm2 is not understanding "-0". This works:
>
> I've wondered about this for a while ... bug or feature?

Lets call it a bug. Heres a lightly tested patch that fixes it.
Apply it in the fvwm sub-directory. (The line numbers could be off a
bit, I do have a few other patches applied.)


*** style.c Wed May 28 11:54:09 1997
--- style.c.orig Wed May 28 11:58:16 1997
***************
*** 293,305 ****
            for(i=0;i<num;i++)
            {
              while(isspace(*restofline))restofline++;
- if (*restofline == '-') { /* If leading minus sign */
- if (i == 0 || i == 2) { /* if a width */
- IconBox[i] += Scr.MyDisplayWidth;
- } else { /* it must be a height */
- IconBox[i] += Scr.MyDisplayHeight;
- } /* end width/height */
- } /* end leading minus sign */
              while((!isspace(*restofline))&&(*restofline!= 0)&&
                    (*restofline != ',')&&(*restofline != '\n'))
                restofline++;
--- 293,298 ----
***************
*** 307,312 ****
--- 300,317 ----
            if(num !=4)
              fvwm_msg(ERR,"ProcessNewStyle",
                       "IconBox style requires 4 arguments!");
+ else
+ {
+ /* check for negative locations */
+ if(IconBox[0] < 0)
+ IconBox[0] += Scr.MyDisplayWidth;
+ if(IconBox[1] < 0)
+ IconBox[1] += Scr.MyDisplayHeight;
+ if(IconBox[2] < 0)
+ IconBox[2] += Scr.MyDisplayWidth;
+ if(IconBox[3] < 0)
+ IconBox[3] += Scr.MyDisplayHeight;
+ }
          }
          else if(mystrncasecmp(restofline,"ICON",4)==0)
          {


> Ric
>
> Richard J Lister, Georgetown Institute for Cognitive and Computational Scienc
> es
> Georgetown University Medical Center, Washington, DC.
> Phone: 202-687 2878
> Email: ric_at_giccs.georgetown.edu
> Web: http://www.giccs.georgetown.edu/
> --

--
Dan Espen                                    Phone: (908) 699-5570
dane_at_bae.bellcore.com
444 Hoes Lane  Room RRC 1C-214
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" 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 Wed May 28 1997 - 11:07:45 BST

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