From 7b9b5baf9bb635d0d31cb0ce46007c3ca8f43cad Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 11 Oct 2002 10:22:06 +0000 Subject: indentation --- src/Screen.cc | 56 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index e25de0e..6451aad 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.69 2002/09/12 14:55:11 rathnor Exp $ +// $Id: Screen.cc,v 1.70 2002/10/11 10:22:06 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -778,6 +778,9 @@ void BScreen::changeWorkspaceID(unsigned int id) { if (id != current_workspace->workspaceID()) { XSync(fluxbox->getXDisplay(), true); FluxboxWindow *focused = fluxbox->getFocusedWindow(); +#ifdef DEBUG + cerr<<__FILE__<<"("<<__FUNCTION__<<"): focused = "<isMoving()) { reassociateGroup(focused, id, true); @@ -800,10 +803,10 @@ void BScreen::changeWorkspaceID(unsigned int id) { if (focused && focused->getScreen() == this && (! focused->isStuck()) && (!focused->isMoving())) { current_workspace->setLastFocusedWindow(focused); - fluxbox->setFocusedWindow((FluxboxWindow *) 0); - + fluxbox->setFocusedWindow(0); // set focused window to none } + // set new workspace current_workspace = getWorkspace(id); workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, true); @@ -814,6 +817,7 @@ void BScreen::changeWorkspaceID(unsigned int id) { if (*resource.focus_last && current_workspace->getLastFocusedWindow() && !(focused && focused->isMoving())) { current_workspace->getLastFocusedWindow()->setInputFocus(); + } else if (focused && focused->isStuck()) { focused->setInputFocus(); } @@ -835,29 +839,37 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS win = fluxbox->getFocusedWindow(); if (id != current_workspace->workspaceID()) { - XSync(fluxbox->getXDisplay(), True); + XSync(BaseDisplay::getXDisplay(), True); if (win && win->getScreen() == this && - (! win->isStuck())) { + (! win->isStuck())) { - if ( win->getTab() ) { - Tab *tab = win->getTab(); - tab->disconnect(); - tab->setPosition(); - } + if ( win->getTab() ) { + Tab *tab = win->getTab(); + tab->disconnect(); + tab->setPosition(); + } - if (win->isIconic()) - win->deiconify(); + if (win->isIconic()) { + win->deiconify(); + } - win->withdraw(); - BScreen::reassociateWindow(win, id, true); - if (changeWS) { - BScreen::changeWorkspaceID(id); - win->setInputFocus(); - } - } + win->withdraw(); + reassociateWindow(win, id, true); + + // change workspace ? + if (changeWS) { + changeWorkspaceID(id); + win->setInputFocus(); + } +#ifdef DEBUG + cerr<<"Sending to id = "<workspaceId="<getWorkspaceNumber()<= getCount()) + if (wkspc_id >= getCount()) { wkspc_id = current_workspace->workspaceID(); +#ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): wkspc_id >= getCount()"<getWorkspaceNumber() == wkspc_id) return; -- cgit v0.11.2