all repos — fluxbox @ cd128d7a3e19e0608b992d5211d7ea88a73ed3cd

custom fork of the fluxbox windowmanager

removed goto
Henrik Kinnunen fluxgen@fluxbox.org
commit

cd128d7a3e19e0608b992d5211d7ea88a73ed3cd

parent

26dafdafbe6ac67479e7b78e77d6da178953a3ab

2 files changed, 17 insertions(+), 13 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -1963,21 +1963,23 @@ return 0;

return other; } +void BScreen::clearXinerama() { +#ifdef DEBUG + cerr<<"BScreen::initXinerama(): dont have Xinerama"<<endl; +#endif // DEBUG + m_xinerama_avail = false; + if (m_xinerama_headinfo) + delete [] m_xinerama_headinfo; + m_xinerama_headinfo = 0; + m_xinerama_num_heads = 0; +} void BScreen::initXinerama() { #ifdef XINERAMA Display *display = FbTk::App::instance()->display(); if (!XineramaIsActive(display)) { -notactive: -#ifdef DEBUG - cerr<<"BScreen::initXinerama(): dont have Xinerama"<<endl; -#endif // DEBUG - m_xinerama_avail = false; - if (m_xinerama_headinfo) - delete [] m_xinerama_headinfo; - m_xinerama_headinfo = 0; - m_xinerama_num_heads = 0; + clearXinerama(); return; } #ifdef DEBUG

@@ -1993,10 +1995,9 @@ /* The call may have actually failed. If this is the first time we init

* Xinerama, fall back to turning it off. If not, pretend nothing * happened -- another event will tell us and it will work then. */ if (!screen_info) { - if (m_xinerama_headinfo) - return; - else - goto notactive; + if (!m_xinerama_headinfo) + clearXinerama(); + return; } if (m_xinerama_headinfo)
M src/Screen.hhsrc/Screen.hh

@@ -407,6 +407,9 @@ int numHeads() const { return m_xinerama_num_heads; }

void initXinerama(); void clearHeads(); + /// clean up xinerama + void clearXinerama(); + /** * Determines head number for a position * @param x position in pixels on the screen