Subject: Notification: incoming/1396

From: [email-masked]
Date: Sun, 15 Aug 2004 10:38:50 -0500 (CDT)

FVWM Bug Tracking notification

new message incoming/1396

Message summary for PR#1396
	From: Manoj Srivastava <[email-masked]>
	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-masked] Sun Aug 15 10:38:49 2004
To: [email-masked]
Cc: Chip Salzenberg <[email-masked]>, [email-masked]
Subject: GotoDesk doesn't wrap around like docs say it should
From: Manoj Srivastava <[email-masked]>
Organization: The Debian Project
Mail-Copies-To: nobody
Mail-Followup-To: [email-masked], Chip Salzenberg <[email-masked]>,
	[email-masked]
Date: Sun, 15 Aug 2004 10:37:47 -0500

Hi,

        [Please retain the CC to [email-masked], 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-masked].
To report problems, send mail to [email-masked]