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 704347 - util: Fix hasPendingMessages
util: Fix hasPendingMessages
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-07-16 19:49 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-07-18 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
util: Fix hasPendingMessages (1.75 KB, patch)
2013-07-16 19:49 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
util: Fix no-more-messages signal (5.32 KB, patch)
2013-07-18 13:03 UTC, Ray Strode [halfline]
committed Details | Review
util: drop call that can't do anything (1.97 KB, patch)
2013-07-18 13:03 UTC, Ray Strode [halfline]
committed Details | Review
unlockDialog: don't unlock explicitly on verification-complete (4.73 KB, patch)
2013-07-18 13:03 UTC, Ray Strode [halfline]
committed Details | Review
screenShield: defer deactivation until all messages are shown (3.25 KB, patch)
2013-07-18 13:04 UTC, Ray Strode [halfline]
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-07-16 19:49:33 UTC
While the UserVerifier does indeed have a _userVerifier inside
it, the hasPendingMessages property is on ourselves, not
_userVerifier.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-07-16 19:49:36 UTC
Created attachment 249319 [details] [review]
util: Fix hasPendingMessages
Comment 2 Ray Strode [halfline] 2013-07-16 19:52:12 UTC
Review of attachment 249319 [details] [review]:

looks right.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-07-16 20:55:12 UTC
Attachment 249319 [details] pushed as a8fe063 - util: Fix hasPendingMessages
Comment 4 Ray Strode [halfline] 2013-07-17 17:03:41 UTC
this is causing new fun.
Comment 5 Ray Strode [halfline] 2013-07-17 20:56:45 UTC
there's actually a number of issues. will post patches in a bit.
Comment 6 Ray Strode [halfline] 2013-07-18 13:03:52 UTC
Created attachment 249497 [details] [review]
util: Fix no-more-messages signal

Now thas hasPendingMessages is fixed, we need to also fix the associated
signal "no-more-messages"
Comment 7 Ray Strode [halfline] 2013-07-18 13:03:56 UTC
Created attachment 249498 [details] [review]
util: drop call that can't do anything

this._clearMessageQueue() is a noop when this.hasPendingMessages is
false so calling it in that case doesn't make sense.

This commit drops that call.
Comment 8 Ray Strode [halfline] 2013-07-18 13:03:59 UTC
Created attachment 249499 [details] [review]
unlockDialog: don't unlock explicitly on verification-complete

logind sends out an "unlock" signal separately when
verification completes and we already listen for that,
so we don't need to unlock on verification-complete, too.
too.
Comment 9 Ray Strode [halfline] 2013-07-18 13:04:03 UTC
Created attachment 249500 [details] [review]
screenShield: defer deactivation until all messages are shown

Right now when a user types their password to unlock their session
we end up getting an unlock signal from GDM right away.  We then
proceed to deactivate the screensaver before the user has a chance
to read his messages.

This commit makes sure we clear out the message queue before processing
the deactivation request.
Comment 10 drago01 2013-07-18 13:18:50 UTC
Review of attachment 249497 [details] [review]:

LG.
Comment 11 drago01 2013-07-18 13:19:16 UTC
Review of attachment 249498 [details] [review]:

OK.
Comment 12 drago01 2013-07-18 13:20:45 UTC
Review of attachment 249499 [details] [review]:

One "too" to many in the commit message ;)
Code looks good.
Comment 13 drago01 2013-07-18 13:22:06 UTC
Review of attachment 249500 [details] [review]:

LG.
Comment 14 Ray Strode [halfline] 2013-07-18 13:25:40 UTC
Attachment 249497 [details] pushed as 952f581 - util: Fix no-more-messages signal
Attachment 249498 [details] pushed as 7d5d745 - util: drop call that can't do anything
Attachment 249499 [details] pushed as 55a04bb - unlockDialog: don't unlock explicitly on verification-complete
Attachment 249500 [details] pushed as ded99b9 - screenShield: defer deactivation until all messages are shown