Hello, Ristretto fails to set up the wallpaper using the menu View -> Set as Wallpaper option. Clicking Apply or OK does nothing. Well, on Apply the 'Set as wallpaper' window blinks for a fraction of a second. Wallpaper stays unchanged. Maybe it's because some changes in the recent xfce4-settings / xfdesktop? Ristretto 0.8.3 on fully-upgraded Xubuntu 18.10 with xfce4-settings 4.13.3 and xfdesktop4 4.13.2 Changing wallpaper from the Thunar's (1.8.1) right-click menu works fine.
Monitoring the xfce4-desktop channel in xfconf, I found that's how the apps set the wallpaper Thunar: /backdrop/screen0/monitoreDP-1/workspace0/last-image = [picture URI] /backdrop/screen0/monitor0/image-path = [picture URI] Ristretto: /backdrop/screen0/monitor0/workspace0/last-image = [picture URI] xfdesktop: /backdrop/screen0/monitoreDP-1/workspace0/last-image = [picture URI] Obviously Ristretto needs to use the monitor name (eDP-1 in my case) not an index. This is the part of code that needs to be checked: https://git.xfce.org/apps/ristretto/tree/src/xfce_wallpaper_manager.c?id=5afe858ce9f1132d4ffc583c385354c15ba258e8#n224 Somehow gdk_screen_get_monitor_plug_name is not yielding a valid monitor name. And this is how Thunar gets monitors names: https://git.xfce.org/xfce/thunar/tree/plugins/thunar-wallpaper/twp-provider.c?id=a5fb15915541759008083804c53a1890c782e885#n252 Sorry, I have no time to put together a patch, I hope the provided info helps.
Created attachment 7907 Patch I don't have a multi-monitor setup to check every setting, but it should be just a basic fix for the problem. I hope the rest is taken care of properly by ristretto :)
@Anna, your patch improves the single workspace behavior, but doesn't fix the problem reported here, it only happens for users of xfdesktop 4.13. Now I fully understand the problem. Ristretto tries to get the monitor name with gdk_screen_get_monitor_plug_name and for some reason it fails, it is expected, so RIstretto fallbacks to monitor number. But xfdesktop 4.13 uses gdk_display_get_monitor (gtk>=3.22), which works, so it doesn't fallback to monitor number. I think we shouldn't try any hack or worry about gtk2 code, it make more sense to first port Ristretto to gtk3.
@Andre Sorry, I missed the version stuff. Just compiled the latest Ristretto code and made it work for me (because it hasn't initially). So this might be a fix for a different bug that Ristretto doesn't set the wallpaper correctly when applied to all workspaces and is running in the "wrong" workspace.
Created attachment 8405 Fix wallpaper manager This is a workaround for Xfdesktop >= 4.13.x, we can use a GDbusProxy in order to connect to the org.xfce.Xfconf service. This fix requires another patch (bug #15286).
Hi Olivier, does your patch work with both 4.12 and 4.13 versions of xfdesktop?
Yes, it works for both version. It is fallback method when gdk_screen_get_monitor_plug_name() returns nothing, we use the org.xfce.Xfconf interface through GDBusProxy.
Olivier Duchateau referenced this bugreport in commit 3778e10f1a32f49a8c8a16bfe9a65626c78f2ae6 Fix wallpaper manager https://git.xfce.org/apps/ristretto/commit?id=3778e10f1a32f49a8c8a16bfe9a65626c78f2ae6
Merged, thank you!
The only problem is this patch doesn't work with multi-monitor configurations: for me, it always sets the wallpaper to the second monitor, no matter which one I choose.
@Igor, maybe the problem is caused by a gdk_screen_get_monitor_plug_name regression[1] fixed in gtk-3.24.10[2] released yesterday. 1 - https://gitlab.gnome.org/GNOME/gtk/commit/cdd6fb32c53eec0c156181393f98d6e534ff9791 2 - https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/NEWS
Andre, they may have fixed a regression, but, unfortunately, ristretto is still on gtk2. The problem, as I see it, is that ristretto only knows about monitor number (0, 1...) while xfdesktop 4.13.x only operates with monitor names (LVDS-1, HDMI-1...). There's no way that I see to get those monitor names out of gtk2 for ristretto. Perhaps, xfdesktop could populate the numbers along with the names? Something like <property name="monitorHDMI-1" type="empty"> <property name="number" type="int" value="1"> That could allow ristretto to match the number it knows with an xfdesktop monitor entry.
Oops, I completely forgot that ristretto wasn't ported, sorry. As I said in comment 3, I don't think it's worth implementing this for ristretto-gtk2 and I'm against the proposed change to xfdesktop. OTOH, why not push the ristretto port and disable the (broken) thumbnail bar? We can try to fix this later, whoever doesn't want to lose that bar can stick with 0.8.x for the time being.
Igor referenced this bugreport in commit b9e367ecc67ad716a4f5c3b2bb4ea4c917ce0b50 Support for setting background image for both gtk2 and gtk3 versions of xfdesktop https://git.xfce.org/apps/ristretto/commit?id=b9e367ecc67ad716a4f5c3b2bb4ea4c917ce0b50