Bug 502749 - Timer jumps if paused and later minimized in any fashion
Summary: Timer jumps if paused and later minimized in any fashion
Status: RESOLVED FIXED
Alias: None
Product: ksudoku
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.4.250390
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: spmorton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-13 15:17 UTC by spmorton
Modified: 2025-04-14 20:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spmorton 2025-04-13 15:17:11 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
If you pause the game, and later minimize, screen lock or change tasks, when you later return to the game, the timer jumps for the period between the pause and the next event.

STEPS TO REPRODUCE
1. Pause an active game
2. Wait 10 seconds
3. Minimize the game
4. Wait 10 seconds
5. Maximize the game


OBSERVED RESULT
Timer jumps 10 seconds

EXPECTED RESULT
timer retains previous value

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2025-04-13 15:39:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/games/ksudoku/-/merge_requests/41
Comment 2 Albert Astals Cid 2025-04-14 20:52:06 UTC
Git commit 05d549f2f6a4169973c200743aae65ee8e62b0a7 by Albert Astals Cid, on behalf of Scott Morton.
Committed on 14/04/2025 at 20:52.
Pushed by aacid into branch 'master'.

Fix storing/restoring the game time

If you pause the game, and later minimize, screen lock or change tasks, when you later return to the game, the timer jumps for the period between the pause and the minimize event.

M  +1    -1    src/gui/ksudoku.cpp

https://invent.kde.org/games/ksudoku/-/commit/05d549f2f6a4169973c200743aae65ee8e62b0a7