History log of /haiku/src/bin/screen_blanker/ScreenSaverWindow.cpp
Revision Date Author Comments
# 69a973e2 23-Nov-2015 Jérôme Duval <jerome.duval@gmail.com>

screen_blanker: fix warning.


# e4e2ce4c 09-Dec-2014 Puck Meerburg <puck@puckipedia.nl>

When testing screensaver, don't have mouse move exit the screen saver.

Fixes #7463

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>


# 22d74352 20-Nov-2013 John Scipione <jscipione@gmail.com>

screen_blanker: Check if be_app is NULL

... before using it after dynamic_cast. Fixes CID 1130496


# 1c776bfe 15-Nov-2013 John Scipione <jscipione@gmail.com>

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.


# d34a680c 14-Nov-2013 John Scipione <jscipione@gmail.com>

Screen Saver: fix race condition

Start the screensaver in the window thread instead of the runner
thread so that there is no lock contention for the window lock in
the runner thread when the saver starts.

The view that gets drawn into is assumed to have been prepared before
being passed to the runner thread, and this assumption has been made
true for the screensaver preview and screen_blanker apps.

Eliminate fHasStarted and the corresponding HasStarted() method in
ScreenSaverRunner as they are no longer needed.

Drawing still happens in the runner thread, and still needs to lock
the window thread potentially causing contention, yet, there
is a timeout here so the contention won't freeze the screensaver window,
only delay drawing the screensaver.

Drawing could be moved to the window thread via message passing to avoid
lock contention with the window but this would defeat a big part of the
purpose of having a separate rendering thread.

This fixes #10125 and #4260


# 0f1162d2 14-Nov-2013 John Scipione <jscipione@gmail.com>

ScreenSaver: Make sure password window is shown

… before resuming the saver on B_KEY_DOWN in the message filter.

It was assumed before, now we’re actually checking to make sure.


# e22c01af 14-Nov-2013 John Scipione <jscipione@gmail.com>

Screen Saver: style fixes


# 6189b5a1 02-Dec-2012 Sergei Reznikov <diver@gelios.net>

Add B_NOT_CLOSEABLE|B_NOT_MINIMIZABLE to ScreenSaverWindow

Yet another screensaver password hack prevented. Yet another
attempt to close #9196 is made.

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>


# d3144dd0 02-Dec-2012 Sergei Reznikov <diver@gelios.net>

Make ScreenSaverWindow B_NOT_MOVABLE-prevent password hack

Fixes #9196

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>


# 7f45fe0b 09-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

The window was blank, making any screensaver drawing over
the desktop drawing over a black screen...
Blackness pseudo screensaver will be fixing next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39789 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a4f8d8c 07-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* We also need to listen to modifier changes and unmapped keys in order to quit
the blanker. This is a regression introduced with r29488.
* This fixes bug #4069.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31441 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 49cc2c3b 14-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Style police at work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29531 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e23a519b 14-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

BHandler deletes the BMessageFilters added to it, so this delete in the
destructor of ScreenSaverWindow was not needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29522 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0834f79c 14-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

An Esc pressed while the password window is showing will close it and resume
the screen saver.

I added this to the filter in the ScreenSaverWindow instead of the
PasswordWindow to avoid having to add another BMessageFilter. It already is
getting all keydowns anyhow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29521 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 04caac4a 14-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

Renamed the new "_fake" mouse moved boolean to "be:transit_only", as suggested
by Axel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29519 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d39c5354 13-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

- Use PostMessage instead of a BMessenger to send a message to the window from
the app.

- Use the new "_fake" parameter to detect the initial mouse moved sent by
app_server instead of a BMessageRunner and delay.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29493 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb6a084f 12-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

Fixed a bug in the screen saver code that could cause someone to get locked out
of their machine: if the password check is turned on, and the password window
is shown but times out (when the screen saver starts again after the standard
delay), the input filter never knew about this and would never try to end the
screen saver again.

The solution is to take the logic for turning off the screen saver out of the
input filter and put it in the screen blanker itself.

Also while working in the input filter I removed some debugging and a TODO that
I think cannot be fixed.

In the screen_blanker the exit after loading the settings file was removed
since the default settings now work for the screen_blanker.

Plus obviously code was added to handle exit upon user input as well as the
timing out of the password window.

If anyone has a better solution for the 250ms timeout to ignore initial mouse
moves, let me know.

Also I think the new calls should be nothrow, but I am not sure what the rule
is for that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29488 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7a9cfbf5 12-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

Oops, the workspace flag is another parameter, not part of the window flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29483 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 41ac8755 12-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

The screen saver window was not shown on all workspaces, which means one could
essentially defeat the password window by just changing workspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29482 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4a1b9897 08-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Made the screen saver window as well as the password window kWindowScreenFeel.
* This makes them highest in the window order, so that floating all windows
like the Deskbar cannot compromise the password protection anymore.
This fixes #2808.
* Note, the password window should also block uses of Alt-Tab, even though this
is usually harmless (as only other windows with kWindowScreenFeel can be
promoted to the front).
* Also note, the password window should actually be an app modal window that
appears in front of the screen saver window. However, the app_server currently
doesn't allow anything but menus on top of a kWindowScreenFeel window.
* Removed changing full screen setting of the ScreenSaver window, as this
shouldn't matter.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27921 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82584ab9 09-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented AS_DIRECT_WINDOW_SET_FULLSCREEN so that it sets kWindowScreenFeel
when enabled, and B_NORMAL_WINDOW_FEEL when disabled. IOW when enabled, no
other windows can interfere.
* Therefore, it's no longer necessary to have the screen_blanker window
use kWindowScreenFeel - it will set its window to full screen as long
as the blanker runs.
* Added a AS_APP_CRASHED notification in the app_server that will remove
all kWindowScreenFeels from the windows of the crashed app.
* This is now used by the debugger to ensure that the debugger alert will
be visible.
* Factored out a DesktopLink class out of the BRoster::_ActivateApp()
method. This class is now also used in the new BRoster::_ApplicationCrashed()
method as used in the debug_server (via BRoster::Private).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0e9fa68 07-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed some memory leaks when using the BMessageRunners.
* Now quits the window directly, instead of letting the application destructor do that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17756 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cbb7d503 13-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* The screen saver window is now a kWindowScreenFeel, and thus should always be
in front of all other windows.
* Added TODO items where the code is strange or messy.
* Big cleanup (renamed files and variables like "fPww" to something more
meaningful).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17126 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4e2ce4ce38546193ddab428b32a654447a07e19 09-Dec-2014 Puck Meerburg <puck@puckipedia.nl>

When testing screensaver, don't have mouse move exit the screen saver.

Fixes #7463

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>


# 22d74352829dc6d768e4c8c982347fe0da6d2798 20-Nov-2013 John Scipione <jscipione@gmail.com>

screen_blanker: Check if be_app is NULL

... before using it after dynamic_cast. Fixes CID 1130496


# 1c776bfe37a7c1a382f9720112f19de00c7cff07 15-Nov-2013 John Scipione <jscipione@gmail.com>

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.


# d34a680c043c72bae01662cc730ca81cb4cd2615 14-Nov-2013 John Scipione <jscipione@gmail.com>

Screen Saver: fix race condition

Start the screensaver in the window thread instead of the runner
thread so that there is no lock contention for the window lock in
the runner thread when the saver starts.

The view that gets drawn into is assumed to have been prepared before
being passed to the runner thread, and this assumption has been made
true for the screensaver preview and screen_blanker apps.

Eliminate fHasStarted and the corresponding HasStarted() method in
ScreenSaverRunner as they are no longer needed.

Drawing still happens in the runner thread, and still needs to lock
the window thread potentially causing contention, yet, there
is a timeout here so the contention won't freeze the screensaver window,
only delay drawing the screensaver.

Drawing could be moved to the window thread via message passing to avoid
lock contention with the window but this would defeat a big part of the
purpose of having a separate rendering thread.

This fixes #10125 and #4260


# 0f1162d27e35f133e86a93b8a7effeec3e34f20f 14-Nov-2013 John Scipione <jscipione@gmail.com>

ScreenSaver: Make sure password window is shown

… before resuming the saver on B_KEY_DOWN in the message filter.

It was assumed before, now we’re actually checking to make sure.


# e22c01af030d33e53e6bbde56e331dd8cd7de097 14-Nov-2013 John Scipione <jscipione@gmail.com>

Screen Saver: style fixes


# 6189b5a12f18c35692dd41c7175565253e5fe1fd 02-Dec-2012 Sergei Reznikov <diver@gelios.net>

Add B_NOT_CLOSEABLE|B_NOT_MINIMIZABLE to ScreenSaverWindow

Yet another screensaver password hack prevented. Yet another
attempt to close #9196 is made.

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>


# d3144dd06b486178e9950fe5a533e435f9ea2179 02-Dec-2012 Sergei Reznikov <diver@gelios.net>

Make ScreenSaverWindow B_NOT_MOVABLE-prevent password hack

Fixes #9196

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>


# 7f45fe0b3e353da50f88a912980a09f8e0de1298 09-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

The window was blank, making any screensaver drawing over
the desktop drawing over a black screen...
Blackness pseudo screensaver will be fixing next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39789 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a4f8d8c183861fdd9a6d61e1c87229bcc799adf 07-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* We also need to listen to modifier changes and unmapped keys in order to quit
the blanker. This is a regression introduced with r29488.
* This fixes bug #4069.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31441 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 49cc2c3bf8d4427bb5e6178e91352b764186e3f2 14-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Style police at work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29531 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e23a519b2a2662c73bd4f90e7e37267636a205f8 14-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

BHandler deletes the BMessageFilters added to it, so this delete in the
destructor of ScreenSaverWindow was not needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29522 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0834f79c8ce6e973204ff08a16ffaa3e97d8a1ff 14-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

An Esc pressed while the password window is showing will close it and resume
the screen saver.

I added this to the filter in the ScreenSaverWindow instead of the
PasswordWindow to avoid having to add another BMessageFilter. It already is
getting all keydowns anyhow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29521 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 04caac4ad128873077bb1949ce2898065f6b8e0b 14-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

Renamed the new "_fake" mouse moved boolean to "be:transit_only", as suggested
by Axel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29519 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d39c5354b8303d1babba79c69ca582804f36b5d4 13-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

- Use PostMessage instead of a BMessenger to send a message to the window from
the app.

- Use the new "_fake" parameter to detect the initial mouse moved sent by
app_server instead of a BMessageRunner and delay.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29493 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb6a084f200d116677acdc7535f476626f09ccaa 12-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

Fixed a bug in the screen saver code that could cause someone to get locked out
of their machine: if the password check is turned on, and the password window
is shown but times out (when the screen saver starts again after the standard
delay), the input filter never knew about this and would never try to end the
screen saver again.

The solution is to take the logic for turning off the screen saver out of the
input filter and put it in the screen blanker itself.

Also while working in the input filter I removed some debugging and a TODO that
I think cannot be fixed.

In the screen_blanker the exit after loading the settings file was removed
since the default settings now work for the screen_blanker.

Plus obviously code was added to handle exit upon user input as well as the
timing out of the password window.

If anyone has a better solution for the 250ms timeout to ignore initial mouse
moves, let me know.

Also I think the new calls should be nothrow, but I am not sure what the rule
is for that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29488 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7a9cfbf50c54676301a0ffd1150631c96c4a64ea 12-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

Oops, the workspace flag is another parameter, not part of the window flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29483 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 41ac8755ced5c2fb51fc5fc79318606c4be92ddb 12-Mar-2009 Ryan Leavengood <leavengood@gmail.com>

The screen saver window was not shown on all workspaces, which means one could
essentially defeat the password window by just changing workspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29482 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4a1b989745f943f222e67b53b6183a39281998c9 08-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Made the screen saver window as well as the password window kWindowScreenFeel.
* This makes them highest in the window order, so that floating all windows
like the Deskbar cannot compromise the password protection anymore.
This fixes #2808.
* Note, the password window should also block uses of Alt-Tab, even though this
is usually harmless (as only other windows with kWindowScreenFeel can be
promoted to the front).
* Also note, the password window should actually be an app modal window that
appears in front of the screen saver window. However, the app_server currently
doesn't allow anything but menus on top of a kWindowScreenFeel window.
* Removed changing full screen setting of the ScreenSaver window, as this
shouldn't matter.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27921 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82584ab9c2996ff4dec740d64eb78c7c0b74c900 09-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented AS_DIRECT_WINDOW_SET_FULLSCREEN so that it sets kWindowScreenFeel
when enabled, and B_NORMAL_WINDOW_FEEL when disabled. IOW when enabled, no
other windows can interfere.
* Therefore, it's no longer necessary to have the screen_blanker window
use kWindowScreenFeel - it will set its window to full screen as long
as the blanker runs.
* Added a AS_APP_CRASHED notification in the app_server that will remove
all kWindowScreenFeels from the windows of the crashed app.
* This is now used by the debugger to ensure that the debugger alert will
be visible.
* Factored out a DesktopLink class out of the BRoster::_ActivateApp()
method. This class is now also used in the new BRoster::_ApplicationCrashed()
method as used in the debug_server (via BRoster::Private).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0e9fa680eae3e69a2d4dff26dbf3e47ad7c9727 07-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed some memory leaks when using the BMessageRunners.
* Now quits the window directly, instead of letting the application destructor do that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17756 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cbb7d5038ab757828d279d2df0a475744baff485 13-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* The screen saver window is now a kWindowScreenFeel, and thus should always be
in front of all other windows.
* Added TODO items where the code is strange or messy.
* Big cleanup (renamed files and variables like "fPww" to something more
meaningful).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17126 a95241bf-73f2-0310-859d-f6bbb57e9c96