spacr.qt.screensaver¶
Show the backdrop alone, full screen, until any input is received.
A SEPARATE WINDOW, not the main one made full screen. Hiding spaCR’s own widgets and restoring them afterwards means remembering what was visible, what had focus, which docks were open and what the splitters were set to – and getting any of it wrong leaves the user’s layout rearranged by something that was meant to be a screensaver. A window of its own has nothing to restore: it is closed and the application is exactly as it was.
IT BUILDS ITS OWN BACKDROP for the same reason. Reparenting the running one would take it off the screen behind it, so leaving the screensaver would have to put it back – and a reparented GL canvas is a context that may not survive the move.
Classes¶
A full-screen backdrop that closes on any key or click. |
Functions¶
|
Open the backdrop full screen on the parent's screen. |
Module Contents¶
- class spacr.qt.screensaver.Screensaver(parent: PySide6.QtWidgets.QWidget | None = None)[source]¶
Bases:
PySide6.QtWidgets.QWidgetA full-screen backdrop that closes on any key or click.
- Parameters:
parent – the window it was opened from, used only so Qt gives the screensaver the same screen.
Build the screensaver as its own full-screen window.
A
Qt.Windowand deliberately not parented into the layout: a child widget cannot go full screen on its own, and a tool window loses focus to the main window the moment it appears – which would send “any key” to the wrong place.- Parameters:
parent – the window it was opened from, remembered so it can be returned to; the screensaver is not parented into it.
- spacr.qt.screensaver.show_screensaver(parent: PySide6.QtWidgets.QWidget | None = None) Screensaver | None[source]¶
Open the backdrop full screen on the parent’s screen.
- Returns:
the window, or None when it could not be opened.