Below is a patch for windowlist.c in the 2.4.9 stable release that adds
support for only listing the windows that have their origins in the
current page of the desk with the option CurrentPage.  I use this in
conjunction with CurrentDesk to only list the windows in the current
view port (emulating classing Sawfish or Windows functionality)

I apologize if this patch is a duplicate or if it isn't appropriate. 

Thanks for a kick ass WM.

Jordan

--- windowlist.old      Mon Apr 22 18:35:58 2002
+++ windowlist.c        Thu Aug 15 16:07:12 2002
@@ -57,6 +57,7 @@
 #define SHOW_ICONNAME (1<<7)
 #define SHOW_ALPHABETIC (1<<8)
 #define SHOW_INFONOTGEO (1<<9)
+#define SHOW_CURRENTPAGE (1<<10)
 #define SHOW_EVERYTHING (SHOW_GEOMETRY | SHOW_ALLDESKS | SHOW_NORMAL | 
SHOW_ICONIC | SHOW_STICKY)
 
 /* Function to compare window title names
@@ -180,6 +181,8 @@
         desk = Scr.CurrentDesk;
         flags &= ~SHOW_ALLDESKS;
       }
+      else if (StrEquals(tok,"CurrentPage")) 
+       flags |= SHOW_CURRENTPAGE;
       else if (StrEquals(tok,"NotAlphabetic"))
         flags &= ~SHOW_ALPHABETIC;
       else if (StrEquals(tok,"Alphabetic"))
@@ -405,6 +408,14 @@
           continue; /* don't want "normal" ones - skip */
         if ((get_layer(t) < low_layer) || (get_layer(t) > high_layer))
           continue;  /* don't want this layer */
+
+       /* Restrict to only viewing the windows having an origin on this page */
+       
+       if ((flags & SHOW_CURRENTPAGE)) 
+         {
+           if (t->frame_g.x < 0 || t->frame_g.x >= Scr.MyDisplayWidth) 
continue;
+           if (t->frame_g.y < 0 || t->frame_g.y >= Scr.MyDisplayHeight) 
continue;
+         }
 
         /* add separator between desks when geometry shown but not at the top*/
         if (t->Desk != last_desk_displayed)



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