Process WM_SYSCOMMAND to forbid screen savers in fullscreen mode (#1065)
* Process WM_SYSCOMMAND to forbid screen savers in fullscreen mode Fixes #1047 * Update CHANGELOG.md and documentation to reflect changes from issue #1065 * Updated documentation of window.Window.set_fullscreen to match the documentation of window.WindowBuilder.with_fullscreen.
This commit is contained in:
parent
f4e9bf51db
commit
e5ba79db04
3 changed files with 17 additions and 0 deletions
|
|
@ -1020,6 +1020,17 @@ unsafe extern "system" fn public_window_callback<T>(
|
|||
// other unwanted default hotkeys as well.
|
||||
winuser::WM_SYSCHAR => 0,
|
||||
|
||||
winuser::WM_SYSCOMMAND => {
|
||||
if wparam == winuser::SC_SCREENSAVE {
|
||||
let window_state = subclass_input.window_state.lock();
|
||||
if window_state.fullscreen.is_some() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
winuser::DefWindowProcW(window, msg, wparam, lparam)
|
||||
}
|
||||
|
||||
winuser::WM_MOUSEMOVE => {
|
||||
use crate::event::WindowEvent::{CursorEntered, CursorMoved};
|
||||
let mouse_was_outside_window = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue