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 697300 - screenShield: Ensure we destroy background container widgets
screenShield: Ensure we destroy background container widgets
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-04-04 23:16 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-04-05 22:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenShield: Ensure we destroy background container widgets (957 bytes, patch)
2013-04-04 23:16 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
background: don't leak background objects during quick changes (3.06 KB, patch)
2013-04-05 17:52 UTC, Ray Strode [halfline]
none Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-04-04 23:16:47 UTC
We may accidentally leak a widget when monitors change while
locked otherwise. This is especially bad because we put a
box-shadow on this widget.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-04-04 23:16:50 UTC
Created attachment 240673 [details] [review]
screenShield: Ensure we destroy background container widgets
Comment 2 Ray Strode [halfline] 2013-04-05 17:50:44 UTC
Review of attachment 240673 [details] [review]:

I don't think this is really right.  The only backgrounds in the group should be the ones managed by the bg manager, and it should clean up after itself.

Looking I do see a problem in the bg manager code, but I'm not immediately sure how we get from there to here.  I'll post a patch for that problem.
Comment 3 Ray Strode [halfline] 2013-04-05 17:52:48 UTC
Created attachment 240780 [details] [review]
background: don't leak background objects during quick changes

We currently let some backgrounds "fall through the cracks" if
a bunch of change notifications come in at once.

This commit fixes that.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-04-05 17:58:44 UTC
(In reply to comment #2)
> Review of attachment 240673 [details] [review]:
> 
> I don't think this is really right.  The only backgrounds in the group should
> be the ones managed by the bg manager, and it should clean up after itself.

There are no backgrounds in the group, only container widgets that the ScreenShield itself creates in _createBackground that the BgManager uses as a container.

I don't think the BgManager should destroy the container.
Comment 5 Ray Strode [halfline] 2013-04-05 21:33:13 UTC
(In reply to comment #4)
> There are no backgrounds in the group, only container widgets that the
> ScreenShield itself creates in _createBackground that the BgManager uses as a
> container.
Ah right, so to be clear we don't have:

new Background.BackgroundManager({ container: this._backgroundGroup, ...});

but instead

new Background.BackgroundManager({ container: widget, ...});
this._backgroundGroup.add_child(widget);

> I don't think the BgManager should destroy the container.
yup, right.
Comment 6 Ray Strode [halfline] 2013-04-05 21:33:44 UTC
Review of attachment 240673 [details] [review]:

+
Comment 7 Ray Strode [halfline] 2013-04-05 21:34:08 UTC
Comment on attachment 240780 [details] [review]
background: don't leak background objects during quick changes

This is unrelated, so i'll post it to a different bug
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-04-05 22:24:15 UTC
Attachment 240673 [details] pushed as 1ee88a2 - screenShield: Ensure we destroy background container widgets