File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1138,7 +1138,7 @@ zwlr_screencopy_manager_v1* CHyprlock::getScreencopy() {
1138
1138
}
1139
1139
1140
1140
void CHyprlock::attemptRestoreOnDeath () {
1141
- if (m_bTerminate)
1141
+ if (m_bTerminate || m_sCurrentDesktop != " Hyprland " )
1142
1142
return ;
1143
1143
1144
1144
const auto XDG_RUNTIME_DIR = getenv (" XDG_RUNTIME_DIR" );
@@ -1176,6 +1176,13 @@ void CHyprlock::attemptRestoreOnDeath() {
1176
1176
ofs << timeNowMs;
1177
1177
ofs.close ();
1178
1178
1179
+ if (m_bLocked && m_sLockState.lock ) {
1180
+ ext_session_lock_v1_destroy (m_sLockState.lock );
1181
+
1182
+ // Destroy sessionLockSurfaces
1183
+ m_vOutputs.clear ();
1184
+ }
1185
+
1179
1186
spawnSync (" hyprctl keyword misc:allow_session_lock_restore true" );
1180
- spawnAsync ( " sleep 2 && hyprlock --immediate --immediate-render & disown " );
1187
+ spawnSync ( " hyprctl dispatch exec \" hyprlock --immediate --immediate-render\" " );
1181
1188
}
You can’t perform that action at this time.
0 commit comments