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 559639 - [background] Delay constructing the GnomeBg object until we need it.
[background] Delay constructing the GnomeBg object until we need it.
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-06 18:32 UTC by Behdad Esfahbod
Modified: 2008-11-06 20:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the patch (3.16 KB, patch)
2008-11-06 18:32 UTC, Behdad Esfahbod
committed Details | Review

Description Behdad Esfahbod 2008-11-06 18:32:11 UTC
Currently, if we suspect nautilus will be running we wait 8s, after that only set background on change notification if nautilus is not running at the time.  We were constructing the GnomeBg object and subscribing for notification before that though.  And starting gnome-screensaver was causing a change notification delivered to us (a bug in GnomeBg?).  We don't have to construct our GnomeBg when we are waiting for nautilus to start up.
Comment 1 Behdad Esfahbod 2008-11-06 18:32:34 UTC
Created attachment 122140 [details] [review]
the patch
Comment 2 Ray Strode [halfline] 2008-11-06 19:04:41 UTC
note bug 552856 introduces an ignore_changes api that suppresses the spurious notifications i was seeing at the time (which was from load_from_preferences() getting called, not sure if gnome-screensaver is also causing notifications)
Comment 3 Behdad Esfahbod 2008-11-06 19:13:34 UTC
In my experience gnome-screensaver was causing notification, yes.  Maybe that one needs the ignore() call too, right?

Anyway, the patch here is correct until those stuff lands.
Comment 4 Ray Strode [halfline] 2008-11-06 19:18:05 UTC
i wonder if the gnome-screensaver notifications was from bug 555701 comment 4 (which is fixed in trunk, bug 555701 comment 10). 
Comment 5 Behdad Esfahbod 2008-11-06 20:47:38 UTC
2008-11-06  Behdad Esfahbod  <behdad@gnome.org>

        * plugins/background/gsd-background-manager.c (setup_bg),
        (queue_draw_background), (gsd_background_manager_start):
        Delay constructing the GnomeBg object until we need it.  This avoids
        unneeded change triggers caused by a bug in gnome-screensaver (fixed 
        in trunk it seems). (bug #559639)