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.

Submitted by: Gilbert Ashley <[email protected]>
Author: Iain Patterson <[email protected]>


1 file changed, 1 insertion(+), 1 deletion(-)
src/switchpanel.c |    2 +-


# HG changeset patch
# User John H. Robinson, IV <[email protected]>
# Date 1229205226 28800
# Node ID 2d7de5e6adb28a69691bb6d796d4f3b01ad0487d
# Parent  568fbe68047b9cca96d6eb064de109ab8b562e06
xinerama switchpanel corruption fix

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.

Submitted by: Gilbert Ashley <[email protected]>
Author: Iain Patterson <[email protected]>

diff --git a/src/switchpanel.c b/src/switchpanel.c
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -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;
     }
     

Reply via email to