After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668967 - Doesn't lock if already in an active state
Doesn't lock if already in an active state
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: general
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-29 19:16 UTC by Marc Deslauriers
Modified: 2012-01-31 17:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that fixes the issue (1.41 KB, patch)
2012-01-29 19:17 UTC, Marc Deslauriers
reviewed Details | Review
revised atch that fixes the issue (1.79 KB, patch)
2012-01-31 16:33 UTC, Marc Deslauriers
committed Details | Review

Description Marc Deslauriers 2012-01-29 19:16:46 UTC
If the screensaver is already active without a lock, and it
got a request to lock, it would bail out without switching to a locked
state.

Reproduce with:
gnome-screensaver-command -a; sleep 5; gnome-screensaver-command -l
Comment 1 Marc Deslauriers 2012-01-29 19:17:50 UTC
Created attachment 206368 [details] [review]
Patch that fixes the issue
Comment 2 Ray Strode [halfline] 2012-01-31 16:14:37 UTC
Review of attachment 206368 [details] [review]:

Thanks.  one comment below:

::: src/gs-monitor.c
@@ +178,2 @@
         res = gs_listener_set_active (monitor->priv->listener, TRUE);
+        if (! res && ! active) {

Shouldn't we avoid calling gs_listener_set_active at all if it's already active?
Comment 3 Marc Deslauriers 2012-01-31 16:22:11 UTC
Ah, yes, that would indeed make more sense. :)
Comment 4 Ray Strode [halfline] 2012-01-31 16:27:15 UTC
You have a git account, yea?  If so, feel free to push your patch with that change.
Comment 5 Marc Deslauriers 2012-01-31 16:33:16 UTC
Created attachment 206529 [details] [review]
revised atch that fixes the issue

I don't believe I have git access. Here's a revised patch. Thanks!