Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent multiple lock requests on Linux #11306

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Conversation

droidmonkey
Copy link
Member

When the screen locks on e.g. gnome we receive multiple independent signals of that, namely the Gnome session manager and the gnome / freedesktop screensaver.

When this happens, this causes multiple "lock database" requests to be issued. The first one correctly shows the question to discard/cancel, but the second one while the first is still asking goes and dismisses the question and then goes to ask it again. The result is it acts like you didn't answer correctly (ie, to cancel) and the database is locked.

Testing strategy

Tested on Gnome

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

* Fixes #11000

When the screen locks on e.g. gnome we receive multiple independent signals of that, namely the Gnome session manager and the gnome / freedesktop screensaver.

When this happens, this causes multiple "lock database" requests to be issued. The first one correctly shows the question to discard/cancel, but the second one while the first is still asking goes and dismisses the question and then goes to ask it again. The result is it acts like you didn't answer correctly (ie, to cancel) and the database is locked.
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 62.97%. Comparing base (c1a66a8) to head (e0ea89e).
Report is 11 commits behind head on develop.

Files with missing lines Patch % Lines
src/gui/DatabaseWidget.cpp 71.43% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #11306      +/-   ##
===========================================
- Coverage    62.97%   62.97%   -0.00%     
===========================================
  Files          362      362              
  Lines        37783    37788       +5     
===========================================
+ Hits         23792    23795       +3     
- Misses       13991    13993       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@droidmonkey droidmonkey merged commit 0941ff4 into develop Oct 7, 2024
11 checks passed
@droidmonkey droidmonkey deleted the fix/multi-lock-linux branch October 7, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking "abort" on the "Unsaved changes" Dialog causes dataloss
1 participant