Bug in AfterStep version 1.8.9 shade feature

Dwight Schauer (das@teegra.net)
Sun, 5 Aug 2001 09:58:05 -0500


On earlier versions of AfterStep I use to disable in source
code the Shade "feature" :-) of animating the window
scrolling up into the title bar.

I've not been using AfterStep for quite a while now, and
just started again recently. In going into the source I
noticed that the problem had been fixed, and it was now
a user configurable option in an AfterStep config file.

In playing around with ShadeAnimationSteps, I set it
too high in my AfterStep feel file and it locked
up on Shade. Looking at the source code I found that
this condition was checked for in several places, but
two places were missed.

Here is the patch for the 1.8.9 source code:

--- functions.c.orig Tue Jul 31 18:37:17 2001
+++ functions.c Tue Jul 31 18:41:47 2001
@@ -1435,6 +1435,8 @@
    h = tmp_win->frame_height;
    w = tmp_win->frame_width;
    s = w / ShadeAnimationSteps;
+   if (s < 1)
+    s = 1;
    x = 0;
    while (w > tmp_win->title_width)
      {
@@ -1451,6 +1453,8 @@
    h = tmp_win->frame_height;
    w = tmp_win->frame_width;
    s = h / ShadeAnimationSteps;
+   if (s < 1)
+  s = 1;
    y = 0;
 
    while (h > tmp_win->title_height)



_______________________________________________
The AfterStep Window Manager for X User's Mailing List
http://mail.afterstep.org/mailman/listinfo/as-users