FVWM Bug Tracking notification

new message incoming/1396

Message summary for PR#1396
        From: Manoj Srivastava <[EMAIL PROTECTED]>
        Subject: GotoDesk doesn't wrap around like docs say it should
        Date: Sun, 15 Aug 2004 10:37:47 -0500
        0 replies       0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From [EMAIL PROTECTED] Sun Aug 15 10:38:49 2004
Received: from host-12-107-230-171.dtccom.net ([12.107.230.171] 
helo=glaurung.internal.golden-gryphon.com)
        by util2.math.uh.edu with esmtp (Exim 4.30)
        id 1BwN5p-0006AA-Ia
        for [EMAIL PROTECTED]; Sun, 15 Aug 2004 10:38:45 -0500
Received: from glaurung.internal.golden-gryphon.com ([EMAIL PROTECTED] 
[127.0.0.1])
        by glaurung.internal.golden-gryphon.com (8.13.1/8.13.1/Debian-6) with 
ESMTP id i7FFble4007113
        (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
        Sun, 15 Aug 2004 10:37:53 -0500
Received: (from [EMAIL PROTECTED])
        by glaurung.internal.golden-gryphon.com (8.13.1/8.13.1/Debian-6) id 
i7FFbl42007112;
        Sun, 15 Aug 2004 10:37:47 -0500
X-Authentication-Warning: glaurung.internal.golden-gryphon.com: srivasta set 
sender to [EMAIL PROTECTED] using -f
To: [EMAIL PROTECTED]
Cc: Chip Salzenberg <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: GotoDesk doesn't wrap around like docs say it should
From: Manoj Srivastava <[EMAIL PROTECTED]>
Organization: The Debian Project
X-URL: http://www.debian.org/%7Esrivasta/
User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)
 (i686-pc-linux-gnu)
Mail-Copies-To: nobody
X-Face:  [EMAIL PROTECTED]/;Y^gTjR\T^"B'fbeuVGiyKrvbfKJl!^e|e:iu(kJ6c|QYB57LP*|t
 &YlP~HF/=h:[EMAIL PROTECTED]:6Cj0kd#4]>*D,|0djf'CVlXkI,>aV4\}?d_KEqsN{Nnt7
 78"OsbQ["56/!nisvyB/uA5Q.{)gm6?q.j71ww.>b9b]-sG8zNt%KkIa>xWg&1VcjZk[hBQ>]j~`Wq
 Xl,y1a!(>6`UM{~'X[Y_,Bv+}=L\SS*mA8=s;!=O`ja|@PEzb&i0}Qp,`Z\:6:OmRi*
Mail-Followup-To: [EMAIL PROTECTED], Chip Salzenberg <[EMAIL PROTECTED]>,
        [EMAIL PROTECTED]
Date: Sun, 15 Aug 2004 10:37:47 -0500
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -4.9 (----)

Hi,

        [Please retain the CC to [EMAIL PROTECTED], so
        that the Debian BTS has a record of your input]

        This was reported by a Debian user. I have looked into CVS,
 and this patch did not seem to have been applied yet (as far as I can
 tell).  This is an old patch, but is still relevant to 2.5.10, I
 think.

        manoj

 The docs on GotoDesk say that when the movement is relative, it should         
 wrap around instead of truncating.  That doesn't work right (you always        
 end up at the end or beginning).  Here's a patch.                              
                                                                                
 --- fvwm-2.5.8-0.3/fvwm/virtual.c       2003-09-25 04:21:28.000000000 -0400    
 +++ fvwm-2.5.8/fvwm/virtual.c   2004-03-18 11:27:29.000000000 -0500            
 @@ -112,4 +112,5 @@                                                            
         int n;                                                                 
         int m;                                                                 
 +       int rel;                                                               
         int desk;                                                              
         int val[4];                                                            
 @@ -138,4 +139,5 @@                                                            
                 /* absolute desk number */                                     
                 desk = val[1];                                                 
 +               rel = 0;                                                       
         }                                                                      
         else                                                                   
 @@ -143,4 +145,5 @@                                                            
                 /* relative desk number */                                     
                 desk += val[0];                                                
 +               rel = 1;                                                       
         }                                                                      
OK                                                         
                                                                                
 @@ -169,7 +172,19 @@                                                           
                         max = val[m];                                          
                 }                                                              
 +               if (rel)                                                       
 +               {                                                              
 +                       /*  Relative moves wrap around.  */                    
 +                       if (desk < min)                                        
 +                       {                                                      
 +                               desk += (max - min + 1);                       
 +                       }                                                      
 +                       else if (desk > max)                                   
 +                       {                                                      
 +                               desk -= (max - min + 1);                       
 +                       }                                                      
 +               }                                                              
                 if (desk < min)                                                
                 {                                                              
 -                       /*  Relative move outside of range, wrap around.  */   
 +                       /*  Move outside of range, truncate.  */               
                         if (val[0] < 0)                                        
                         {                                                      
 @@ -183,5 +198,5 @@                                                            
                 else if (desk > max)                                           
                 {                                                              
 -                       /*  Relative move outside of range, wrap around.  */   
 +                       /*  Move outside of range, truncate.  */               
                         if (val[0] > 0)                                        
                         {                                                      
                                                                                
                                                                                
 -- System Information:                                                         
 Debian Release: testing/unstable                                               
   APT prefers unstable                                                         
   APT policy: (500, 'unstable'), (1, 'experimental')                           
 Architecture: i386 (i686)                                                      
 Kernel: Linux 2.6.4bk4                                                         
 Locale: LANG=C, LC_CTYPE=C                                                     
                                                                                
 Versions of packages fvwm depends on:                                          
 ii  libc6                       2.3.2.ds1-11 GNU C Library: Shared libraries an
 ii  libice6                     4.3.0-5      Inter-Client Exchange library     
 ii  libpng12-0                  1.2.5.0-5    PNG library - runtime             
 ii  libsm6                      4.3.0-5      X Window System Session Management
 ii  libx11-6                    4.3.0-5      X Window System protocol client li
 ii  libxext6                    4.3.0-5      X Window System miscellaneous exte
 ii  libxpm4                     4.3.0-5      X pixmap library                  
 ii  xlibs                       4.3.0-6      X Window System client libraries m
 ii  zlib1g                      1:1.2.1-5    compression library - runtime     
                                                                                

-- 
A day without sunshine is like night.
Man
====> MESSAGE TRUNCATED AT 8192 <====



--
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 PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to