Subject: FVWM: Bug or Feature?

From: David Peart <[email-masked]>
Date: Tue, 23 Apr 1996 12:56:02 -0700

I noticed that when I resize a windows frame and bump into the virtual
desktop edge the frame is resized to fit across the entire virtual
desktop.  In my case three displays.  Has anyone else noticed this?
If I resize a frame across a display boundary that is not also the
cirtual boundary it works fine.

thanks,

David L. Peart
[email-masked]
(503) 264-2498

I WORK for Intel, I don't SPEAK for Intel.
<http://www-md6.intel.com/~dpeart>
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: <[email-masked]> (Charles Hines)
Date: Tue, 23 Apr 1996 16:01:09 -0400

>>>>> "David" == David Peart <[email-masked]> writes:

David> I noticed that when I resize a windows frame and bump into the
David> virtual desktop edge the frame is resized to fit across the
David> entire virtual desktop.  In my case three displays.  Has anyone
David> else noticed this?  If I resize a frame across a display
David> boundary that is not also the cirtual boundary it works fine.

Yikes!  I was able to reproduce this pretty easily.  I'll look into it
for the next release...

Chuck

---

From: Henrique Martins <[email-masked]>
Date: Tue, 23 Apr 1996 22:37:34 -0700

David> I noticed that when I resize a windows frame and bump into the
David> virtual desktop edge the frame is resized to fit across the
David> entire virtual desktop.  

Chuck> Yikes!  I was able to reproduce this pretty easily.  I'll look into it
Chuck> for the next release...

  Mea culpa! I sent Chuck a patch to fix some other wrap around problem in
  virtual.c, and when looking at the code thought I could simplify another
  section.  I did warn Chuck that my simplification was probably
  overlooking something, more or less in these terms:
  
Henrique>  ... removal of those checks may have side effects that I can't
Henrique>  seem to catch. ...

  and that seems to be the case :-(

  The patch below restores the 2.0.41 code, and should fix the problem
  David bumped into. It should apply (although I haven't tried) to either
  the 2.0.42 distribution or the distribution+my_mega_patch.

  -- Henrique ([email-masked])

------------------------------------------------------------------------------

*** virtual.c.orig	Mon Apr 15 17:31:40 1996
--- virtual.c	Tue Apr 23 22:22:15 1996
***************
*** 96,114 ****
    /* Ouch! lots of bounds checking */
    if(Scr.Vx + *delta_x < 0) 
      {
!       if (Scr.flags & EdgeWrapX)
  	{
!  	  *delta_x = Scr.VxMax;
!  	  *xl = x + Scr.MyDisplayWidth;
  	}
      }
    else if(Scr.Vx + *delta_x > Scr.VxMax)
      {
!       if (Scr.flags & EdgeWrapX)
  	{
!  	  *delta_x = -Scr.VxMax;
!  	  *xl = x - Scr.MyDisplayWidth;
  	}
      }
    else
      *xl = x - *delta_x;
--- 96,124 ----
    /* Ouch! lots of bounds checking */
    if(Scr.Vx + *delta_x < 0) 
      {
!       if (!(Scr.flags & EdgeWrapX ))
  	{
! 	  *delta_x = -Scr.Vx;
! 	  *xl = x - *delta_x;
  	}
+       else 
+ 	{
+ 	  *delta_x += Scr.VxMax + Scr.MyDisplayWidth;
+ 	  *xl = x + *delta_x % Scr.MyDisplayWidth + HorWarpSize;
+ 	}
      }
    else if(Scr.Vx + *delta_x > Scr.VxMax)
      {
!       if (!(Scr.flags & EdgeWrapX))
  	{
! 	  *delta_x = Scr.VxMax - Scr.Vx;
! 	  *xl = x - *delta_x;
  	}
+       else 
+ 	{
+ 	  *delta_x -= Scr.VxMax +Scr.MyDisplayWidth;
+ 	  *xl = x + *delta_x % Scr.MyDisplayWidth - HorWarpSize;
+ 	}
      }
    else
      *xl = x - *delta_x;
***************
*** 115,133 ****
    
    if(Scr.Vy + *delta_y < 0) 
      {
!       if (Scr.flags & EdgeWrapY)
  	{
!  	  *delta_y = Scr.VyMax;
!  	  *yt = y + Scr.MyDisplayHeight;
  	}
      }
    else if(Scr.Vy + *delta_y > Scr.VyMax) 
      {
!       if (Scr.flags & EdgeWrapY)
  	{
!  	  *delta_y = -Scr.VyMax;
!  	  *yt = y - Scr.MyDisplayHeight;
  	}
      }
    else
      *yt = y - *delta_y;
--- 125,153 ----
    
    if(Scr.Vy + *delta_y < 0) 
      {
!       if (!(Scr.flags & EdgeWrapY))
  	{
! 	  *delta_y = -Scr.Vy;
! 	  *yt = y - *delta_y;
  	}
+       else
+ 	{
+ 	  *delta_y += Scr.VyMax + Scr.MyDisplayHeight;
+ 	  *yt = y + *delta_y % Scr.MyDisplayHeight + VertWarpSize;
+ 	}
      }
    else if(Scr.Vy + *delta_y > Scr.VyMax) 
      {
!       if (!(Scr.flags & EdgeWrapY))
  	{
! 	  *delta_y = Scr.VyMax - Scr.Vy;
! 	  *yt = y - *delta_y;
  	}
+       else
+ 	{
+ 	  *delta_y -= Scr.VyMax + Scr.MyDisplayHeight;
+ 	  *yt = y + *delta_y % Scr.MyDisplayHeight - VertWarpSize;
+ 	}
      }
    else
      *yt = y - *delta_y;

---

From: David Peart <[email-masked]>
Date: Wed, 24 Apr 1996 08:19:58 -0700

This works great now!

Thanks,

David L. Peart
[email-masked]
(503) 264-2498

>>>>> "Henrique" == Henrique Martins <[email-masked]> writes:

    David> I noticed that when I resize a windows frame and bump into
    David> the virtual desktop edge the frame is resized to fit across
    David> the entire virtual desktop.

    Chuck> Yikes!  I was able to reproduce this pretty easily.  I'll
    Chuck> look into it for the next release...

    Henrique>   Mea culpa! I sent Chuck a patch to fix some other wrap
    Henrique> around problem in virtual.c, and when looking at the
    Henrique> code thought I could simplify another section.  I did
    Henrique> warn Chuck that my simplification was probably
    Henrique> overlooking something, more or less in these terms:
  
    Henrique> ... removal of those checks may have side effects that I
    Henrique> can't seem to catch. ...

    Henrique>   and that seems to be the case :-(

    Henrique>   The patch below restores the 2.0.41 code, and should
    Henrique> fix the problem David bumped into. It should apply
    Henrique> (although I haven't tried) to either the 2.0.42
    Henrique> distribution or the distribution+my_mega_patch.

    Henrique>   -- Henrique ([email-masked])