all repos — fluxbox @ 7b9b5baf9bb635d0d31cb0ce46007c3ca8f43cad

custom fork of the fluxbox windowmanager

indentation
fluxgen fluxgen
commit

7b9b5baf9bb635d0d31cb0ce46007c3ca8f43cad

parent

03fc8ed5ec1a6f70ee5fb205c4bf9d4f15cd9f01

1 files changed, 36 insertions(+), 20 deletions(-)

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

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@

if (id != current_workspace->workspaceID()) { XSync(fluxbox->getXDisplay(), true); FluxboxWindow *focused = fluxbox->getFocusedWindow(); +#ifdef DEBUG + cerr<<__FILE__<<"("<<__FUNCTION__<<"): focused = "<<focused<<endl; +#endif // DEBUG if (focused && focused->isMoving()) { reassociateGroup(focused, id, true);

@@ -800,10 +803,10 @@

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 @@

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 @@ if (!win)

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 = "<<id<<endl; + cerr<<"win->workspaceId="<<win->getWorkspaceNumber()<<endl; +#endif //DEBUG } + + } }

@@ -1100,8 +1112,12 @@

void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { if (! w) return; - if (wkspc_id >= getCount()) + if (wkspc_id >= getCount()) { wkspc_id = current_workspace->workspaceID(); +#ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): wkspc_id >= getCount()"<<endl; +#endif // DEBUG + } if (w->getWorkspaceNumber() == wkspc_id) return;