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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user