From aad50046de0b1971f869ee95a0f80267c74a1fd3 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 5 Jun 2002 04:20:08 +0000 Subject: synched with bb-cvs. couple bug fixes. --- src/Screen.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/Screen.cc') diff --git a/src/Screen.cc b/src/Screen.cc index 8779733c..512475c8 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1040,10 +1040,14 @@ void BScreen::changeWorkspaceID(unsigned int id) { workspacemenu->setItemSelected(current_workspace->getID() + 2, False); - if (blackbox->getFocusedWindow() && - blackbox->getFocusedWindow()->getScreen() == this && - ! blackbox->getFocusedWindow()->isStuck()) { - current_workspace->setLastFocusedWindow(blackbox->getFocusedWindow()); + BlackboxWindow *focused = blackbox->getFocusedWindow(); + if (focused && focused->getScreen() == this && ! focused->isStuck()) { + if (focused->getWorkspaceNumber() != current_workspace->getID()) { + fprintf(stderr, "%s is on the wrong workspace, aborting\n", + focused->getTitle()); + abort(); + } + current_workspace->setLastFocusedWindow(focused); blackbox->setFocusedWindow((BlackboxWindow *) 0); } @@ -1079,7 +1083,8 @@ void BScreen::manageWindow(Window w) { XMapRequestEvent mre; mre.window = w; - win->restoreAttributes(); + if (blackbox->isStartup()) + win->restoreAttributes(); win->mapRequestEvent(&mre); } -- cgit v1.2.3