[kactivitymanagerd] [Bug 365606] createActivity in plasma script unreliable

2016-07-18 Thread Ivan Čukić via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=365606

Ivan Čukić  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Ivan Čukić  ---
Fixed in 3af24524702e92215a9cce4dcba6b421ac51be4e

ScriptEngine exports the list of activities known to Plasma

Summary:
There is a small time-window when Plasma's internal data
regarding activities is not synchronized with the internal
data of the KActivities library.

This leads to Plasma reporting a different list of activities
than the list of activities it has containments for.

This patch changes the activity list that the ScriptEngine reports
to be the one that Plasma knows about.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kactivitymanagerd] [Bug 365606] createActivity in plasma script unreliable

2016-07-15 Thread Ivan Čukić via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=365606

--- Comment #12 from Ivan Čukić  ---
Changing KActivities to be more synchronous is a tad more intrusive than I
hoped it would be - it is designed to have everything as asynchronous as
possible.

The change in the ScriptEngine would be much simpler, and would IMO be what it
should have done in the first place. The proposed patch is here:

https://phabricator.kde.org/D2187

-- 
You are receiving this mail because:
You are watching all bug changes.

[kactivitymanagerd] [Bug 365606] createActivity in plasma script unreliable

2016-07-15 Thread Ivan Čukić via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=365606

--- Comment #11 from Ivan Čukić  ---
Ok, the final problem found - ScriptEngine::desktopsForActivity tests whether
the activity exists and it is called before the signal that the activity has
been created arrived in plasma.

The problematic situation:
1. The script requests activity creation
2. Activity manager registers a new activity
3. desktopsForActivity tests whether activity exists, it does not as far as
plasma is concerned
4. Plasma gets the signal that the new activity has been created

Now, this might be something to change in the activities framework - not to
wait until the 'new activity' signal arrives before adding it to local cache,
but I'm not sure it would be a good idea. There are currently no
synchronization guarantees in kactivities.

(the weekend is a lonely time on IRC, so I'm posting the real-time findings
here :) )

-- 
You are receiving this mail because:
You are watching all bug changes.

[kactivitymanagerd] [Bug 365606] createActivity in plasma script unreliable

2016-07-15 Thread Ivan Čukić via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=365606

--- Comment #10 from Ivan Čukić  ---
After the first problematic part (the above one which is now fixed), the second
problem is that sometimes insertActivity is called before activityAdded and
sometimes after.

insertActivity is called be the script engine, and activityAdded when the
activity manager notifies plasma of the new activity that has been created.

The fun thing is that this is not the core of the problem. Even when the order
is forced, something is wrong - the script returns 0 for the number of desktops
sometimes or most of the time.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kactivitymanagerd] [Bug 365606] createActivity in plasma script unreliable

2016-07-13 Thread Ivan Čukić via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=365606

--- Comment #2 from Ivan Čukić  ---
There were no (intentional) changes to kamd in recent releases. I'll
investigate, but I think the problem is in plasmashell.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kactivitymanagerd] [Bug 365606] createActivity in plasma script unreliable

2016-07-13 Thread Luca Beltrame via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=365606

Luca Beltrame  changed:

   What|Removed |Added

 CC||notm...@gmail.com

--- Comment #1 from Luca Beltrame  ---
Adding notmart also to the CC, as this was discussed with him on IRC.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kactivitymanagerd] [Bug 365606] createActivity in plasma script unreliable

2016-07-13 Thread Luca Beltrame via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=365606

Luca Beltrame  changed:

   What|Removed |Added

 CC||lbeltr...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.