	From: Iain Patterson <wm <at> iain.cx>
	Subject: Patch: Fixed switchpanel corruption in Xinerama
	Newsgroups: gmane.compw.window-managers.windowmaker.devel
	Date: 2006-08-09 09:26:37 GMT (1 year, 43 weeks, 2 days, 2 hours and 23 minutes ago)

	This is a small patch to fix an issue with the switchpanel and a 
	large number of windows which happens only on a Xinerama setup.

	When the number of open windows is so large that displaying all of 
	them would cause the switchpanel to be too wide for the screen, the 
	panel is supposed to shrink and scroll to accomodate them all.

	In Window Maker 0.92.0 this works for single head displays but not 
	for Xinerama.  The panel extends to the next head and gets garbled. 
	This patch fixes the issue by correctly constraining the panel to the 
	head with the cursor.
--- src/switchpanel.c.orig      2004-10-30 08:16:04.000000000 +0100
+++ src/switchpanel.c   2006-08-09 09:33:20.000000000 +0100
@@ -464,7 +464,7 @@
     iconsThatFitCount= count;

     if (width > rect.size.width) {
-        iconsThatFitCount = (WMScreenWidth(scr->wmscreen)-SCREEN_BORDER_SPACING)/ICON_TILE_SIZE;
+        iconsThatFitCount = (rect.size.width-SCREEN_BORDER_SPACING)/ICON_TILE_SIZE;
         width= iconsThatFitCount*ICON_TILE_SIZE;
     }

