just a little clean up
This commit is contained in:
parent
3a75379606
commit
816190411a
1 changed files with 36 additions and 37 deletions
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "Screen.hh"
|
||||||
|
@ -1049,54 +1049,53 @@ int BScreen::removeLastWorkspace() {
|
||||||
|
|
||||||
|
|
||||||
void BScreen::changeWorkspaceID(unsigned int id) {
|
void BScreen::changeWorkspaceID(unsigned int id) {
|
||||||
if (! current_workspace || id >= workspacesList.size())
|
if (! current_workspace || id >= workspacesList.size() ||
|
||||||
|
id == current_workspace->workspaceID())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (id != current_workspace->workspaceID()) {
|
XSync(FbTk::App::instance()->display(), true);
|
||||||
XSync(FbTk::App::instance()->display(), true);
|
FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow();
|
||||||
FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow();
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cerr<<__FILE__<<"("<<__FUNCTION__<<"): focused = "<<focused<<endl;
|
cerr<<__FILE__<<"("<<__FUNCTION__<<"): focused = "<<focused<<endl;
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
|
||||||
if (focused && focused->isMoving()) {
|
if (focused && focused->isMoving()) {
|
||||||
if (doOpaqueMove())
|
if (doOpaqueMove())
|
||||||
reassociateWindow(focused, id, true);
|
reassociateWindow(focused, id, true);
|
||||||
// don't reassociate if not opaque moving
|
// don't reassociate if not opaque moving
|
||||||
focused->pauseMoving();
|
focused->pauseMoving();
|
||||||
|
}
|
||||||
|
|
||||||
|
// reassociate all windows that are stuck to the new workspace
|
||||||
|
Workspace *wksp = getCurrentWorkspace();
|
||||||
|
Workspace::Windows wins = wksp->getWindowList();
|
||||||
|
Workspace::Windows::iterator it = wins.begin();
|
||||||
|
for (; it != wins.end(); ++it) {
|
||||||
|
if ((*it)->isStuck()) {
|
||||||
|
reassociateWindow(*it, id, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// reassociate all windows that are stuck to the new workspace
|
current_workspace->hideAll();
|
||||||
Workspace *wksp = getCurrentWorkspace();
|
|
||||||
Workspace::Windows wins = wksp->getWindowList();
|
|
||||||
Workspace::Windows::iterator it = wins.begin();
|
|
||||||
for (; it != wins.end(); ++it) {
|
|
||||||
if ((*it)->isStuck()) {
|
|
||||||
reassociateWindow(*it, id, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
current_workspace->hideAll();
|
workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, false);
|
||||||
|
|
||||||
workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, false);
|
// set new workspace
|
||||||
|
current_workspace = getWorkspace(id);
|
||||||
|
|
||||||
// set new workspace
|
workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, true);
|
||||||
current_workspace = getWorkspace(id);
|
if (getToolbar() != 0)
|
||||||
|
getToolbar()->redrawWorkspaceLabel(true);
|
||||||
|
|
||||||
workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, true);
|
current_workspace->showAll();
|
||||||
if (getToolbar() != 0)
|
|
||||||
getToolbar()->redrawWorkspaceLabel(true);
|
|
||||||
|
|
||||||
current_workspace->showAll();
|
if (focused && (focused->isStuck() || focused->isMoving())) {
|
||||||
|
focused->setInputFocus();
|
||||||
|
} else
|
||||||
|
Fluxbox::instance()->revertFocus(this);
|
||||||
|
|
||||||
if (focused && (focused->isStuck() || focused->isMoving())) {
|
if (focused && focused->isMoving()) {
|
||||||
focused->setInputFocus();
|
focused->resumeMoving();
|
||||||
} else
|
|
||||||
Fluxbox::instance()->revertFocus(this);
|
|
||||||
|
|
||||||
if (focused && focused->isMoving()) {
|
|
||||||
focused->resumeMoving();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateNetizenCurrentWorkspace();
|
updateNetizenCurrentWorkspace();
|
||||||
|
|
Loading…
Reference in a new issue