git-svn-id: svn://db.shs.com.ru/pip@223 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2016-08-16 13:15:20 +00:00
parent 36125b9132
commit 450138e4ac
9 changed files with 54 additions and 25 deletions

View File

@@ -323,14 +323,21 @@ PIScreen::PIScreen(bool startNow, PIKbdListener::KBFunc slot): PIThread(), drawe
ret_func = slot;
tile_focus = tile_dialog = 0;
root.screen = this;
listener = new PIKbdListener(key_eventS, this);
listener = new PIKbdListener(key_eventS, this, startNow);
if (startNow) start();
}
PIScreen::~PIScreen() {
piCoutObj << "~PIScreen";
if (isRunning())
stop();
piCoutObj << "stop PIScreen .. ";
PIThread::waitForFinish(10);
piCoutObj << "stop PIScreen ok";
piCoutObj << "stop listener .. ";
listener->waitForFinish(10);
piCoutObj << "stop listener ok";
delete listener;
}
@@ -462,6 +469,7 @@ void PIScreen::stop(bool clear) {
void PIScreen::begin() {
listener->start();
nextFocus(&root);
console.begin();
}
@@ -493,6 +501,7 @@ void PIScreen::run() {
void PIScreen::end() {
listener->stop();
console.end();
}