! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Handle xfdesktop's single workspace mode
Status:
RESOLVED: FIXED
Product:
Thunar-wallpaper-plugin
Component:
General

Comments

Description Eric Koegel editbugs 2014-07-27 12:41:16 CEST
Created attachment 5562 
Improve twp to handle xfdesktop's single workspace mode

https://bugzilla.xfce.org/show_bug.cgi?id=10509 pointed out that the wallpaper plugin doesn't correctly handle xfdesktop's single workspace mode. This patch adds the functionality.
Comment 1 Eric Koegel editbugs 2014-12-04 17:49:53 CET
So the steps to reproduce:
- Make multiple workspaces. 
- Open xfdesktop settings on workspace #2. 
- Enable "Apply to all workspaces"
- change to a different workspace
- right click on an image in thunar and set as wallpaper

Notice the wallpaper didn't change

Apply this patch and restart thunar - make sure the daemon isn't running (and xfdesktop, just to be sure) It should change now.
Comment 2 Eric Koegel editbugs 2014-12-06 19:21:51 CET
Created attachment 5801 
Improve twp and xfdesktop 4.11

Version 2. The biggest changes are using g_strcmp0 instead of g_strstr and the variables are set to NULL before being used.
Comment 3 Andrzej editbugs 2015-01-29 00:03:35 CET
Can you make the plugin check these properties via xfconf API rather than spawning xfconf-query? The dependency should be optional with either #ifdefs or disabling the plugin when xfconf is not available (no xfconf -> no xfdesktop).

Also, twp should check the current image style (bug #11116) rather than fallback to the default one.
Comment 4 Eric Koegel editbugs 2015-02-02 08:37:07 CET
Created attachment 5897 
xfconf based and handle single workspace mode

Of course! I probably should have looked at the configure.ac.in file, xfconf is required http://git.xfce.org/xfce/thunar/tree/configure.ac.in#n139 so I didn't add any conditional checks. Let me know if there's more you'd like to have done.
Comment 5 Andrzej editbugs 2015-02-02 23:17:05 CET
I have pushed the patch but setting the wallpaper from thunar doesn't work. This is likely a problem with xfdesktop4 itself, though.
Comment 6 Andrzej editbugs 2015-02-02 23:20:12 CET
Created attachment 5898 
xfce4-desktop properties

Dump of xfce4-desktop properties on my desktop. Note multiple monitor sections - it seems that thunar and xfdesktop4 are using different ones. Also, some strings are quoted, others are not.
Comment 7 Harald Judt editbugs 2015-02-07 09:56:10 CET
Created attachment 5909 
0001-thunar-wallpaper-Do-not-use-escaped-filenames-for-xf.patch

The remaining problems seem to be:

* thunar-wallpaper still creates monitor0 entries (with image style 0) but also updates the monitor_name entry. According to the comments in the source code, this is intended, to support pre-4.11 versions of xfdesktop.

* The image entries updated by thunar contain single quotes which is why the image is not shown. The trivial attached patch fixes this, please apply.
Comment 8 Steve Dodier-Lazaro editbugs 2015-02-08 18:14:47 CET
Eric, Andrzej, could you please test Harald's latest patch and apply it in time for 4.12 if satisfactory?
Comment 9 ToZ editbugs 2015-02-08 20:35:26 CET
I've run into the same problem - Thunar right-click, save as wallpaper has stopped working. Applying Harald's patch works only if I change the wallpaper from the first workspace. If I use thunar to try change the wallpaper from another workspace, it still doesn't work. Here are the contents of my xfce4-desktop xfconf channel for 3 scenarios:

1. Pre-patch:
-------------
/backdrop/screen0/monitorLVDS1/workspace0/color-style  0
/backdrop/screen0/monitorLVDS1/workspace0/image-style  5
/backdrop/screen0/monitorLVDS1/workspace0/last-image   /home/toz/Pictures/BlueBlackBlocks/1b.jpg
/backdrop/screen0/monitorLVDS1/workspace1/color-style  0
/backdrop/screen0/monitorLVDS1/workspace1/image-style  5
/backdrop/screen0/monitorLVDS1/workspace1/last-image   /usr/share/backgrounds/xfce/xfce-blue.jpg
/backdrop/screen0/monitorLVDS1/workspace2/color-style  0
/backdrop/screen0/monitorLVDS1/workspace2/image-style  5
/backdrop/screen0/monitorLVDS1/workspace2/last-image   '/home/toz/Pictures/441_1a_7197.jpg'
/backdrop/screen0/monitorLVDS1/workspace3/color-style  0
/backdrop/screen0/monitorLVDS1/workspace3/image-style  5
/backdrop/screen0/monitorLVDS1/workspace3/last-image   /usr/share/backgrounds/xfce/xfce-blue.jpg
/desktop-icons/font-size                               7.000000
/desktop-icons/icon-size                               28
/desktop-icons/right-click-edits-menu                  false
/desktop-icons/tooltip-size                            48.000000
/desktop-icons/use-custom-font-size                    true
/desktop-menu/show                                     false
/last/window-height                                    515
/last/window-width                                     611


2. Post-Patch, from workspace 3:
---------------------------
/backdrop/screen0/monitor0/image-path                  /home/toz/Pictures/441_1a_7197.jpg
/backdrop/screen0/monitor0/image-show                  true
/backdrop/screen0/monitor0/image-style                 0
/backdrop/screen0/monitorLVDS1/workspace0/color-style  0
/backdrop/screen0/monitorLVDS1/workspace0/image-style  5
/backdrop/screen0/monitorLVDS1/workspace0/last-image   /home/toz/Pictures/BlueBlackBlocks/1b.jpg
/backdrop/screen0/monitorLVDS1/workspace1/color-style  0
/backdrop/screen0/monitorLVDS1/workspace1/image-style  5
/backdrop/screen0/monitorLVDS1/workspace1/last-image   /usr/share/backgrounds/xfce/xfce-blue.jpg
/backdrop/screen0/monitorLVDS1/workspace2/color-style  0
/backdrop/screen0/monitorLVDS1/workspace2/image-style  5
/backdrop/screen0/monitorLVDS1/workspace2/last-image   /home/toz/Pictures/441_1a_7197.jpg
/backdrop/screen0/monitorLVDS1/workspace3/color-style  0
/backdrop/screen0/monitorLVDS1/workspace3/image-style  5
/backdrop/screen0/monitorLVDS1/workspace3/last-image   /usr/share/backgrounds/xfce/xfce-blue.jpg
/desktop-icons/font-size                               7.000000
/desktop-icons/icon-size                               28
/desktop-icons/right-click-edits-menu                  true
/desktop-icons/tooltip-size                            48.000000
/desktop-icons/use-custom-font-size                    true
/desktop-menu/show                                     false
/last/window-height                                    515
/last/window-width                                     611



3. Post-patch, from workspace 1:
--------------------------------
/backdrop/screen0/monitor0/image-path                  /home/toz/Pictures/441_1a_7197.jpg
/backdrop/screen0/monitor0/image-show                  true
/backdrop/screen0/monitor0/image-style                 0
/backdrop/screen0/monitorLVDS1/workspace0/color-style  0
/backdrop/screen0/monitorLVDS1/workspace0/image-style  5
/backdrop/screen0/monitorLVDS1/workspace0/last-image   /home/toz/Pictures/441_1a_7197.jpg
/backdrop/screen0/monitorLVDS1/workspace1/color-style  0
/backdrop/screen0/monitorLVDS1/workspace1/image-style  5
/backdrop/screen0/monitorLVDS1/workspace1/last-image   /usr/share/backgrounds/xfce/xfce-blue.jpg
/backdrop/screen0/monitorLVDS1/workspace2/color-style  0
/backdrop/screen0/monitorLVDS1/workspace2/image-style  5
/backdrop/screen0/monitorLVDS1/workspace2/last-image   /home/toz/Pictures/abstract_unique-1920x1080.jpg
/backdrop/screen0/monitorLVDS1/workspace3/color-style  0
/backdrop/screen0/monitorLVDS1/workspace3/image-style  5
/backdrop/screen0/monitorLVDS1/workspace3/last-image   /usr/share/backgrounds/xfce/xfce-blue.jpg
/desktop-icons/font-size                               7.000000
/desktop-icons/icon-size                               28
/desktop-icons/right-click-edits-menu                  true
/desktop-icons/tooltip-size                            48.000000
/desktop-icons/use-custom-font-size                    true
/desktop-menu/show                                     false
/last/window-height                                    515
/last/window-width                                     611
Comment 10 ToZ editbugs 2015-02-08 20:38:07 CET
Some more info. I started with a fresh xfce4-desktop.xml file. On the gui, "Apply to all workspaces" was checked but there was no entry in the xfce4-desktop xfconf channel. I then un-clicked and re-clicked the option, the appropriate settings were created in the channel:

/backdrop/single-workspace-mode                        true
/backdrop/single-workspace-number                      0

...and it works fine now.

Seems to be a discrepancy between default gui settings and xfonf settings.
Comment 11 Eric Koegel editbugs 2015-02-09 14:06:41 CET
Created attachment 5920 
0001-TWP-Single-workspace-mode-TRUE-is-the-default-Bug-11.patch

Good catch ToZ! This patch builds on hjudt's patch to fix the the single-workspace-mode issue.
Comment 12 ToZ editbugs 2015-02-09 15:31:01 CET
Verified that this patch fixes the above issue. Thanks Eric.
Comment 13 Andrzej editbugs 2015-02-11 22:51:45 CET
Thank you for testing and patches. Pushed the fixes to git.

Please reopen this bug or file a new one if you spot another issue. Marking it as resolved.

Bug #11047

Reported by:
Eric Koegel
Reported on: 2014-07-27
Last modified on: 2015-02-11

People

Assignee:
Andrzej
CC List:
5 users

Version

Version:
unspecified

Attachments

Additional information