Lock screensaver window directly

By passing the window pointer to ScreenSaverRunner contructor and using that
to lock the window when drawing instead of getting the window from the
Window() method of the view. This is safer.
This commit is contained in:
John Scipione
2013-11-15 21:27:13 -05:00
parent c4684f1e0b
commit 1c776bfe37
5 changed files with 16 additions and 18 deletions
@@ -14,13 +14,15 @@
#include <ScreenSaver.h>
#include <View.h>
#include <Window.h>
#include "ScreenSaverSettings.h"
class ScreenSaverRunner {
public:
ScreenSaverRunner(BView* view,
ScreenSaverRunner(BWindow* window,
BView* view,
ScreenSaverSettings& settings);
~ScreenSaverRunner();
@@ -38,6 +40,7 @@ private:
static status_t _ThreadFunc(void* data);
status_t _Run();
BWindow* fWindow;
BView* fView;
bool fIsDirectDraw;
ScreenSaverSettings& fSettings;