From 816190411a9e5bd6cdfaa9d579f84be348a2f1bc Mon Sep 17 00:00:00 2001 From: rathnor Date: Sun, 11 May 2003 11:47:19 +0000 Subject: just a little clean up --- src/Screen.cc | 71 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 1b27ff3..3964c9a 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.152 2003/05/10 22:52:44 fluxgen Exp $ +// $Id: Screen.cc,v 1.153 2003/05/11 11:47:19 rathnor Exp $ #include "Screen.hh" @@ -1049,54 +1049,53 @@ int BScreen::removeLastWorkspace() { void BScreen::changeWorkspaceID(unsigned int id) { - if (! current_workspace || id >= workspacesList.size()) + if (! current_workspace || id >= workspacesList.size() || + id == current_workspace->workspaceID()) return; - - if (id != current_workspace->workspaceID()) { - XSync(FbTk::App::instance()->display(), true); - FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow(); + + XSync(FbTk::App::instance()->display(), true); + FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow(); #ifdef DEBUG - cerr<<__FILE__<<"("<<__FUNCTION__<<"): focused = "<