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 693854 - Fix barrier pressure
Fix barrier pressure
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-15 02:25 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-02-15 21:51 UTC
See Also:
GNOME target: 3.8
GNOME version: ---


Attachments
barrier: Add a time field to MetaBarrierEvent (1.46 KB, patch)
2013-02-15 02:25 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
layout: Fix old event removal (1.09 KB, patch)
2013-02-15 02:25 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
layout: Remove _addBarrierEvent (1.31 KB, patch)
2013-02-15 02:26 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-02-15 02:25:04 UTC
See patches. Cosimo spotted this today, so I decided to investigate.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-02-15 02:25:06 UTC
Created attachment 236208 [details] [review]
barrier: Add a time field to MetaBarrierEvent

This was used in gnome-shell, but last-minute changes and multiple
branch confusion on my part meant the field actually never got added.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-02-15 02:25:26 UTC
Created attachment 236209 [details] [review]
layout: Fix old event removal

If we increment our index variable while looping, this means that
firstNewEvent will be one higher than it should. With a length 1
array, all events will be removed, so this has a cascading effect
that events will not be stored at all.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-02-15 02:26:06 UTC
Created attachment 236210 [details] [review]
layout: Remove _addBarrierEvent

Moving it inline to when we get the event means that we can
remove the duplicate call to _getDistanceAcrossBarrier.



Just a cleanup patch due to last-minute algorithm changes.
Not crucial, but simplifies the code a tiny bit.
Comment 4 Owen Taylor 2013-02-15 21:42:45 UTC
Review of attachment 236208 [details] [review]:

time needs to be guint32, since it's a server time, which are CARD32 in the protocol.
Comment 5 Owen Taylor 2013-02-15 21:43:44 UTC
Review of attachment 236209 [details] [review]:

Yes
Comment 6 Owen Taylor 2013-02-15 21:44:24 UTC
Review of attachment 236210 [details] [review]:

OK, sure.
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-02-15 21:49:26 UTC
Comment on attachment 236208 [details] [review]
barrier: Add a time field to MetaBarrierEvent

Attachment 236208 [details] pushed as e8b0c11 - barrier: Add a time field to MetaBarrierEvent


Pushed with suggested change.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-02-15 21:51:02 UTC
Attachment 236209 [details] pushed as 001bbd3 - layout: Fix old event removal
Attachment 236210 [details] pushed as e3eb4a2 - layout: Remove _addBarrierEvent