Re: FVWM: Bug or Feature?

From: Henrique Martins <martins_at_martins.hpl.hp.com>
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 (martins_at_hpl.hp.com)

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

*** 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;

--
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 Apr 24 1996 - 00:34:57 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:58 BST