abstract shared parts of switchTo methods away

This commit is contained in:
Andrzej Rybczak
2012-09-15 22:27:50 +02:00
parent f7dba0a578
commit 14587cb4ec
46 changed files with 301 additions and 463 deletions

View File

@@ -28,6 +28,7 @@
#include "status.h"
#include "statusbar.h"
#include "title.h"
#include "screen_switcher.h"
using Global::MainHeight;
using Global::MainStartY;
@@ -47,21 +48,7 @@ Outputs::Outputs()
void Outputs::switchTo()
{
using Global::myLockedScreen;
if (myScreen == this)
return;
if (myLockedScreen)
updateInactiveScreen(this);
if (hasToBeResized || myLockedScreen)
resize();
if (myScreen != this && myScreen->isTabbable())
Global::myPrevScreen = myScreen;
myScreen = this;
w.Window::clear();
SwitchTo::execute(this);
drawHeader();
}