From: Dana Jansens Date: Mon, 22 Jul 2002 09:15:23 +0000 (+0000) Subject: menu was off-by-one when no xinerama support was built in X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=c15287a8225aeda9c509a57561a9bcb420e0c983;p=chaz%2Fopenbox menu was off-by-one when no xinerama support was built in --- diff --git a/src/Configmenu.cc b/src/Configmenu.cc index d986e3b7..13266d36 100644 --- a/src/Configmenu.cc +++ b/src/Configmenu.cc @@ -74,18 +74,22 @@ Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) { void Configmenu::setValues(void) { - setItemSelected(3, getScreen()->doImageDither()); - setItemSelected(4, getScreen()->doOpaqueMove()); - setItemSelected(5, getScreen()->doFullMax()); - setItemSelected(6, getScreen()->doFocusNew()); - setItemSelected(7, getScreen()->doFocusLast()); - setItemSelected(8, getScreen()->getWindowToWindowSnap()); - - setItemSelected(9, getScreen()->getWindowCornerSnap()); - setItemEnabled(9, getScreen()->getWindowToWindowSnap()); + int index = 2; +#ifdef XINERAMA + ++index; +#endif // XINERAMA + setItemSelected(index++, getScreen()->doImageDither()); + setItemSelected(index++, getScreen()->doOpaqueMove()); + setItemSelected(index++, getScreen()->doFullMax()); + setItemSelected(index++, getScreen()->doFocusNew()); + setItemSelected(index++, getScreen()->doFocusLast()); + setItemSelected(index++, getScreen()->getWindowToWindowSnap()); + + setItemSelected(index, getScreen()->getWindowCornerSnap()); + setItemEnabled(index++, getScreen()->getWindowToWindowSnap()); - setItemSelected(10, getScreen()->allowScrollLock()); - setItemSelected(11, getScreen()->doHideToolbar()); + setItemSelected(index++, getScreen()->allowScrollLock()); + setItemSelected(index++, getScreen()->doHideToolbar()); }