fixed some uninited members and locks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17114 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
190b4fa4ef
commit
7008829b0f
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Authors:
|
||||
* Michael Phipps
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
*/
|
||||
#include <Application.h>
|
||||
#include <Screen.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Authors:
|
||||
* Michael Phipps
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
*/
|
||||
|
||||
#ifndef PASSWORDWINDOW_H
|
||||
@ -26,7 +26,7 @@ class PasswordWindow : public BWindow
|
||||
|
||||
void Setup(void);
|
||||
const char *GetPassword(void) {return fPassword->Text();}
|
||||
void SetPassword(const char* text) { Lock(); fPassword->SetText(text); fPassword->MakeFocus(true); Unlock(); }
|
||||
void SetPassword(const char* text) { if (Lock()) { fPassword->SetText(text); fPassword->MakeFocus(true); Unlock();} }
|
||||
|
||||
bool fDie;
|
||||
private:
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Authors:
|
||||
* Michael Phipps
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
*/
|
||||
#include "SSAwindow.h"
|
||||
#include <View.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Authors:
|
||||
* Michael Phipps
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
*/
|
||||
#include <Debug.h>
|
||||
#include <stdio.h>
|
||||
@ -36,6 +36,9 @@ int main(int, char**)
|
||||
ScreenSaverApp::ScreenSaverApp()
|
||||
: BApplication(SCREEN_BLANKER_SIG),
|
||||
fWin(NULL),
|
||||
fSaver(NULL),
|
||||
fThrd(NULL),
|
||||
fPww(NULL),
|
||||
fThreadID(-1),
|
||||
fRunner(NULL)
|
||||
{
|
||||
@ -73,16 +76,17 @@ ScreenSaverApp::ReadyToRun()
|
||||
void
|
||||
ScreenSaverApp::ShowPW()
|
||||
{
|
||||
fWin->Lock();
|
||||
if (fThreadID > -1)
|
||||
suspend_thread(fThreadID);
|
||||
if (B_OK==fWin->SetFullScreen(false)) {
|
||||
fWin->Sync();
|
||||
ShowCursor();
|
||||
fPww->Show();
|
||||
fPww->Sync();
|
||||
if (fWin->Lock()) {
|
||||
if (fThreadID > -1)
|
||||
suspend_thread(fThreadID);
|
||||
if (B_OK==fWin->SetFullScreen(false)) {
|
||||
fWin->Sync();
|
||||
ShowCursor();
|
||||
fPww->Show();
|
||||
fPww->Sync();
|
||||
}
|
||||
fWin->Unlock();
|
||||
}
|
||||
fWin->Unlock();
|
||||
delete fRunner;
|
||||
fRunner = new BMessageRunner(BMessenger(this), new BMessage(RESUME_SAVER), fPref.BlankTime(), 1);
|
||||
if (fRunner->InitCheck() != B_OK) {
|
||||
@ -112,14 +116,15 @@ ScreenSaverApp::MessageReceived(BMessage *message)
|
||||
break;
|
||||
}
|
||||
case RESUME_SAVER:
|
||||
fWin->Lock();
|
||||
if (B_OK==fWin->SetFullScreen(true)) {
|
||||
HideCursor();
|
||||
fPww->Hide();
|
||||
if (fWin->Lock()) {
|
||||
if (B_OK==fWin->SetFullScreen(true)) {
|
||||
HideCursor();
|
||||
fPww->Hide();
|
||||
}
|
||||
if (fThreadID > -1)
|
||||
resume_thread(fThreadID);
|
||||
fWin->Unlock();
|
||||
}
|
||||
if (fThreadID > -1)
|
||||
resume_thread(fThreadID);
|
||||
fWin->Unlock();
|
||||
default:
|
||||
BApplication::MessageReceived(message);
|
||||
break;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Authors:
|
||||
* Michael Phipps
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
* Jérôme Duval, jerome.duval@free.fr
|
||||
*/
|
||||
|
||||
#ifndef SCREEN_SAVER_APP_H
|
||||
|
Loading…
Reference in New Issue
Block a user