git-svn-id: svn://db.shs.com.ru/pip@223 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user