Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ General Public License v2 (GPLv2). See LICENSES directory or go to

## Fixed
- Prevent Back In Time crash when a plugin fails ([#2447](https://github.com/bit-team/backintime/issues/2447))
- Prevent user from exiting the restore window while running causing backintime to freeze. (Dominic Maluski, @maluskid, [#2503](https://github.com/bit-team/backintime/issues/2503))

## [1.6.1] (2026-02-10)

Expand Down
18 changes: 18 additions & 0 deletions qt/restoredialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ def exec(self):
def _slot_thread_finished(self):
self._btn_close.setEnabled(True)

def closeEvent(self, event): # noqa: N802
"""
intercept close event to prevent canceling restoration early
this provides protection against upper corner x as well as
alt-f4 key presses
"""
# Check if close button is enabled to avoid using new variable
# Could add a boolean to __init__ for easier readability
if not self._btn_close.isEnabled():
messagebox.critical(
self,
_("A critical process is currently running. Window "
"cannot be closed until restoration is finished.")
)
event.ignore()
else:
event.accept()


class RestoreThread(QThread):
"""
Expand Down