psifidotos / workflow-project

This is an effort to create a KDE Plasmoid that integrates the main Activities, Virtual Desktops and Tasks Functionalities from Plasma Desktop in just one component.
http://workflow.opentoolsandspace.org/
GNU General Public License v2.0
11 stars 2 forks source link

Background images need activity restart #3

Closed MagicMuscleMan closed 12 years ago

MagicMuscleMan commented 12 years ago

If an activity is already running when WorkFlow is started, KDE's default background image is shown in WorkFlow although the activity has another background. If the activity is stopped and restarted, the background image is shown correctly.

psifidotos commented 12 years ago

The background loading must be investigated also in your system. In general this is not supported from official KDE. In order to find the activities' backgrounds I am searching through the configuration files. There are two possibilities.

  1. Do you use a second screen from time to time? (if yes, KDE has for your second screen stored its values and WorkFlow can not distinct in the same Activity the different screens)
  2. If not, then we must track it down to your system to see if that's a general behavior for the operating system or for your specific configuration
MagicMuscleMan commented 12 years ago

I do not use a second screen, but as my user profile is very old, I sure had a different monitor installed once. Thus I tested this on a newly created user profile and it shows the same behaviour. The background image gets only updated after restarting the activity.

Could you point me to the specific configuration files, then I can post their contents. Please tell me the timing when I should have a look at the configuration files relative to changing the background image if it is important.

psifidotos commented 12 years ago

There are two files:

~/.kde4/share/config/plasma-desktop-appletsrc (this is for all plasmoids in running activities) ~/.kde4/share/apps/plasma-desktop/activities (every stopped activity has a separate file)

I need the first file and from any activity with the specified behavior the second one when it is stopped.

MagicMuscleMan commented 12 years ago

Am Samstag, 25. August 2012 schrieb Michail Vourlakos:

There are two files:

~/.kde4/share/config/plasma-desktop-appletsrc (this is for all plasmoids in running activities) ~/.kde4/share/apps/plasma-desktop/activities (every stopped activity has a separate file)

I need the first file and from any activity with the specified behavior the second one when it is stopped.

I changed the wallpaper in activity "Neue Aktivität" (c9f5c601- d145-4513-8cd2-4a1ec66de803) from "Ariya" to "Aghi".

After changing the wallpaper, but before stopping the activity, plasma- desktop-appletsrc still points to "Ariya". The activity file does not exist at that time. After stopping the activity, the activity file gets created with the new wallpaper name "Aghi" and plasma-desktop-appletsrc gets updated, too.

In other words, the information does not seem to exist in the file system before stopping the activity. Does it really work for you? I would have thought, that either a DBUS call is necessary to get the information directly, or to trigger writing the configuration, to get the information indirectly. [Containments][10] ActionPluginsSource=Global activity=Neue Aktivität activityId=c9f5c601-d145-4513-8cd2-4a1ec66de803 desktop=-1 formfactor=0 geometry=1926,0,1920,1200 immutability=1 lastDesktop=-1 lastScreen=0 location=0 plugin=desktop screen=-1 wallpaperplugin=image wallpaperpluginmode=SingleImage zvalue=0

[Containments][10][Wallpaper][image] slideTimer=10 slidepaths=/usr/share/wallpapers/ userswallpapers= wallpaper=/usr/share/wallpapers/Aghi/ wallpapercolor=0,0,0 wallpaperposition=0 [ActionPlugins] MidButton;NoModifier=paste RightButton;NoModifier=contextmenu wheel:Vertical;NoModifier=switchdesktop

[Containments][1] activity= activityId= desktop=-1 formfactor=2 geometry=0,-41,1920,35 immutability=1 lastDesktop=-1 lastScreen=0 location=4 plugin=panel screen=0 zvalue=0

[Containments][1][ActionPlugins] RightButton;NoModifier=contextmenu

[Containments][1][Applets][2] geometry=0,3,32,32 immutability=1 plugin=launcher zvalue=0

[Containments][1][Applets][2][LayoutInformation] Order=0

[Containments][1][Applets][3] geometry=36,3,32,32 immutability=1 plugin=org.kde.showActivityManager zvalue=0

[Containments][1][Applets][3][LayoutInformation] Order=1

[Containments][1][Applets][4] geometry=72,3,41,32 immutability=1 plugin=pager zvalue=0

[Containments][1][Applets][4][LayoutInformation] Order=2

[Containments][1][Applets][5] geometry=117,3,1629,32 immutability=1 plugin=tasks zvalue=0

[Containments][1][Applets][5][Configuration][Launchers] browser=preferred://browser, , ,\s filemanager=preferred://filemanager, , ,\s

[Containments][1][Applets][5][LayoutInformation] Order=3

[Containments][1][Applets][6] geometry=1750,3,78,32 immutability=1 plugin=systemtray zvalue=0

[Containments][1][Applets][6][Configuration] DefaultAppletsAdded=true

[Containments][1][Applets][6][Configuration][Applets][8] geometry=4,4,24,24 immutability=1 plugin=notifications zvalue=0

[Containments][1][Applets][6][Configuration][Applets][8][Configuration][ExtenderItems][1] extenderIconName=dialog-information extenderItemName=jobGroup extenderTitle=Vorgänge isCollapsed=true isGroup=true sourceAppletId=8 sourceAppletPluginName=notifications

[Containments][1][Applets][6][Configuration][Applets][8][PopupApplet] DialogHeight=164 DialogWidth=368

[Containments][1][Applets][6][Configuration][Applets][9] geometry=4,60,24,24 immutability=1 plugin=notifier zvalue=0

[Containments][1][Applets][6][Configuration][Applets][9][PopupApplet] DialogHeight=368 DialogWidth=318

[Containments][1][Applets][6][Configuration][Shortcuts] Systemtray-Klipper-6=Ctrl+Alt+V

[Containments][1][Applets][6][LayoutInformation] Order=4

[Containments][1][Applets][6][PopupApplet] DialogHeight=144 DialogWidth=302

[Containments][1][Applets][7] geometry=1832,3,64,32 immutability=1 plugin=digital-clock zvalue=0

[Containments][1][Applets][7][LayoutInformation] Order=5

[Containments][1][Configuration] maximumSize=1920,35 minimumSize=1920,35

[Containments][10] ActionPluginsSource=Global activity=Neue Aktivität activityId=c9f5c601-d145-4513-8cd2-4a1ec66de803 desktop=-1 formfactor=0 geometry=1926,0,1920,1200 immutability=1 lastDesktop=-1 lastScreen=0 location=0 plugin=desktop screen=0 wallpaperplugin=image wallpaperpluginmode=SingleImage zvalue=0

[Containments][10][Wallpaper][image] slideTimer=10 slidepaths=/usr/share/wallpapers/ userswallpapers= wallpaper=/usr/share/wallpapers/Ariya wallpapercolor=0,0,0 wallpaperposition=0

[Containments][11] ActionPluginsSource=Global activity= activityId= desktop=-1 formfactor=0 geometry=-100663290,-16777215,1920,1200 immutability=1 lastDesktop=-1 lastScreen=-1 location=0 plugin=desktopDashboard screen=-1 wallpaperplugin=image wallpaperpluginmode=SingleImage zvalue=0

[Containments][11][Applets][12] geometry=560,193,901,668 immutability=1 plugin=workflow zvalue=1

[Containments][11][Applets][12][Configuration] Animations=1 CurrentTheme=Oxygen FirstRunCalibration=false FirstRunTour=true FontRelevance=0 HideOnClick=false LockActivities=true ShowStoppedPanel=true ShowWindows=true ToolTipsDelay=300 WindowPreviews=false WindowPreviewsOffsetX=0 WindowPreviewsOffsetY=0 ZoomFactor=50

[Containments][11][Applets][12][Configuration][ExtenderItems][4] extenderIconName=preferences-activities extenderItemName=WorkFlow extenderTitle=WorkFlow sourceAppletId=12 sourceAppletPluginName=workflow

[Containments][8] ActionPluginsSource=Global activity=Desktop activityId=fcc07b05-cfb5-4f04-a484-739aeb61ceaf desktop=-1 formfactor=0 geometry=0,0,1920,1200 immutability=1 lastDesktop=-1 lastScreen=0 location=0 plugin=desktop screen=-1 wallpaperplugin=image wallpaperpluginmode=SingleImage zvalue=0

[Containments][8][Wallpaper][image] slideTimer=10 slidepaths=/usr/share/wallpapers/ userswallpapers= wallpaper=joy wallpapercolor=0,0,0 wallpaperposition=2

psifidotos commented 12 years ago

The wallpaper loading should support the following: 1.When the plasmoid is loading the Activities should show the right wallpapers 2.Changing the wallpaper in an Activity does not trigger a signal so the only way to update your wallpaper is either by stopping - restore or by activating again an Activity (until yesterday that was when you click on a Workarea - we probably must add it to when you generally activate an activity for example from the yesterday's new feature of activating an activity without clicking a WorkArea)

MagicMuscleMan commented 12 years ago

Ok, I now see, that my testing maybe was misleading. So 2. cannot be completely solved in current KDE, so the issue should be delayed beyond 0.2. In the following I will concentrate on 1.

  1. works for some activities, but not for all. I try to investigate the difference between the activities. Maybe this shows something interesting.
MagicMuscleMan commented 12 years ago

Ok, so I created a test user with two activities and reduced the plasma-desktop-appletsrc file to the bare minimum. activity "Neue Aktivität" shows the backtround image in WorkFlow after starting, whereas activity "Desktop" does not.

[Containments][10] activity=Neue Aktivität

[Containments][10][Wallpaper][image] slidepaths=/usr/share/wallpapers/ wallpaper=/usr/share/wallpapers/Chess/

[Containments][8] activity=Desktop

[Containments][8][Wallpaper][image] slidepaths=/usr/share/wallpapers/ wallpaper=joy

So the non-working activity seems to have some sort of intelligent path. The directory "/usr/share/wallpapers/" does not directly contain images but subdirectories. One of the subdirectories is named "joy". I think the important subdirectory is /usr/share/wallpapers/joy/contents/images/. An ls gives the following 1024x768.png 1280x1024.png 1280x800.png 1366x768.png 1600x1200.png 1920x1080.png 1920x1200.png

So there seems to be an intelligent loading mechanism, automatically selecting the image with the best resolution. As the previews are so small, this probably does not matter, because the smallest (the first one if the files are sorted) file in that directory will do. If there are problems with the aspect ratio, we have to think more (just taking the one with the correct resolution is not always possible).

Further investigations show, that entries like wallpaper=/usr/share/wallpapers/joy also occur. So the logic should be like this:

if !isAbsolutePath($wallpaper)
    $wallpaper = $slidepaths + $wallpaper

if isDirectory($wallpaper)
    $wallpaper = findFirstFile($slidepaths + $wallpaper + "/contents/images/")

load($wallpaper)
MagicMuscleMan commented 12 years ago

Ok, I can confirm, that 1. works now.

MagicMuscleMan commented 12 years ago

I wanted to report on my remaining problems with wallpapers. It did not work on all my activities with my main user. The problem were activities which contained different containments with the same name in ~/.kde/share/apps/plasma-desktop/activities/. Only one of the containments contained the correct wallpaper, the other ones had KDE's default wallpaper. As those containments looked useless, I deleted them when being logged off. After login, WorkFlow showed correct wallpapers.

psifidotos commented 12 years ago

It is exactly the case of second screen. KDE in order to remember the settings for a second, third etc. screen creates a new Containment with its own settings for wallpaper, plasmoids etc.... Workflow currently can not distinguish correctly which Containment for the same activity is the correct one....

MagicMuscleMan commented 12 years ago

This might be the reason. But I had up to four entries per containment, although I strongly doubt, that I had that many screens connected cumulated over time. I guess, there are other reasons, too, to have several Containments.