forked from quickshell/quickshell
wayland/lock: initialize lock content before starting lock
Reduces any chances of the compositor displaying a blank frame first.
This commit is contained in:
parent
71a65c4d3c
commit
8ec245ac66
4 changed files with 79 additions and 57 deletions
|
@ -63,6 +63,8 @@ LockWindowExtension* LockWindowExtension::get(QWindow* window) {
|
|||
}
|
||||
}
|
||||
|
||||
bool LockWindowExtension::isAttached() const { return this->surface != nullptr; }
|
||||
|
||||
bool LockWindowExtension::attach(QWindow* window, SessionLockManager* manager) {
|
||||
if (this->surface != nullptr)
|
||||
qFatal() << "Cannot change the attached window of a LockWindowExtension";
|
||||
|
|
|
@ -61,6 +61,8 @@ public:
|
|||
~LockWindowExtension() override;
|
||||
Q_DISABLE_COPY_MOVE(LockWindowExtension);
|
||||
|
||||
[[nodiscard]] bool isAttached() const;
|
||||
|
||||
// Attach this lock extension to the given window.
|
||||
// The extension is reparented to the window and replaces any existing lock extension.
|
||||
// Returns false if the window cannot be used.
|
||||
|
@ -70,8 +72,6 @@ public:
|
|||
// To make a window invisible, destroy it as it cannot be recovered.
|
||||
void setVisible();
|
||||
|
||||
[[nodiscard]] bool isLocked() const;
|
||||
|
||||
static LockWindowExtension* get(QWindow* window);
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue