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 544178 - Listen for workspace changes to change background image.
Listen for workspace changes to change background image.
Status: RESOLVED WONTFIX
Product: gnome-settings-daemon
Classification: Core
Component: background
2.23.x
Other All
: Normal enhancement
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on: 543596
Blocks: 48004
 
 
Reported: 2008-07-22 14:57 UTC by James Sharpe
Modified: 2013-01-27 21:46 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Adds libwnck to reload the background preferences on workspace change (3.84 KB, patch)
2008-07-22 14:58 UTC, James Sharpe
reviewed Details | Review

Description James Sharpe 2008-07-22 14:57:13 UTC
Patch attached to listen for workspace changes and reload the background preferences for the new current workspace.
Comment 1 James Sharpe 2008-07-22 14:58:17 UTC
Created attachment 115011 [details] [review]
Adds libwnck to reload the background preferences on workspace change
Comment 2 Jens Granseuer 2008-07-24 17:35:31 UTC
Hm. What about having the GnomeBG listen for the switch instead and simply letting that issue the normal "changed" signal.

(Also, some minor quibbles concerning non-matching coding style.)
Comment 3 James Sharpe 2008-07-24 19:43:26 UTC
To do that we'd have to have the concept of the GnomeBG object tracking the gconf key; since currently a GnomeBG is only synchronised to gconf when an explicit save request is made.
Comment 4 Jens Granseuer 2008-07-26 09:20:13 UTC
The obvious advantage with doing it that way would be you don't have to copy and paste the code in g-s-d and nautilus. Do you see any disadantages? Or advantages of doing it the other way around?
Comment 5 James Sharpe 2008-07-28 22:08:34 UTC
Having thought about it a bit more its not clear exactly how you would define the semantics of a GnomeBG tracking the gconf keys.
There are two cases:
1. The gconf key changes
2. The current active workspace changes

Case 1 is straight forward since you can just record the notify id from the gconf api in the GnomeBG object and emit the changed signal in the callback.

Case 2 is not so easy to define; in some cases e.g. the capplet you'd want the GnomeBG object to track gconf but not workspace changes, but in other cases you'd want to track both types of changes i.e. in g-s-d and nautilus. Other bugs suggest though that knowing the difference between the two types of changes is useful; there's a bug for people who want different sets of icons on the desktop which would imply changing XDGHOME or something similar on workspace change and you could also implement per workspace sound theme support too; in that case you'd be duplicating the workspace change code again, it would seem more appropriate and semantically correct to have the code in the settings-daemon rather than in the individual libraries.

An alternative would be to place the code into gnome-desktop as a separate workspace configuration object, which could aggregate the different per workspace settings e.g. background, sound theme etc.. and do the signal emission there; we can mirror the libwnck api and have a ScreenSettings object that contains multiple WorkspaceSettings objects; then the API would become well defined for the cases above; WorkspaceSettings would emit signals in case 1, ScreenSettings would signal changes in case 2. I think this would be the best way forward since it avoids copy n paste code and has the flexibility to be extended in the future.
Comment 6 Jens Granseuer 2008-07-30 16:33:08 UTC
Fair enough. If you can get an ok from the nautilus camp as well, I'm fine with this approach.
Comment 7 Matthias Clasen 2008-12-05 19:40:52 UTC
Any update on this ?

Per-workspace backgrounds are a relatively common feature request ...
Comment 8 Tomas Bzatek 2010-11-16 16:01:25 UTC
If I understand correctly, workspace means monitor #1, #2 etc. in multi-monitor setup, right? So different background image for every one of them? What about different settings like zoom/stretch/tile etc.?

The gnome_bg_load_from_preferences() call in your patch takes a workspace number argument, do you have that gnome-bg patch somewhere? Otherwise you would have to deal with storage of values for additional screens, now with GSettings.

I'm not familiar with libwnck much, is there a significant difference to those "monitors-changed" and "size-changed" signals of GdkScreen that we're using now?

Anyway, I agree this should go to gnome-bg since gnome-settings-daemon and nautilus share that code now.

(In reply to comment #3)
> To do that we'd have to have the concept of the GnomeBG object tracking the
> gconf key; since currently a GnomeBG is only synchronised to gconf when an
> explicit save request is made.
This is still true with GSettings and we can't add monitoring to GnomeBG since settings can be loaded from different places and workarounds could be in place, so at the end monitoring wouldn't work as expected (false notifications, misses).
Comment 9 William Jon McCann 2012-05-04 21:05:38 UTC
This doesn't really make a lot of sense in GNOME 3 with dynamic workspaces I think. Perhaps this can be implemented as an extension?
Comment 10 Bastien Nocera 2013-01-27 21:46:38 UTC
Especially as gnome-shell will soon handle the background on its own. See bug 682427.