Review Request: GlobalShortcuts Plugin for ActivityManager (kamd)
Lamarque Vieira Souza
lamarque at kde.org
Tue Apr 10 09:48:31 UTC 2012
> On April 4, 2012, 5:13 p.m., Lamarque Vieira Souza wrote:
> > service/plugins/globalshortcuts/globalshortcuts.cpp, line 41
> > <http://git.reviewboard.kde.org/r/104428/diff/4/?file=55580#file55580line41>
> >
> > Maybe the slowness has nothing to do with your patch. Last weekend I was debugging a crash in Bluedevil (when I turn off my bluetooth controller). I had to restart kded4 to do some tests and I noticed that while kded is loading its modules the whole desktop freezes.
> >
> > Usually the splash screen hides this problem, in my case there were no splash screen since I restarted only kded4.
>
> makis marimpis wrote:
> Hm, in every case i tried the plugin by restarting my kde session.
> Without the plugin, all icons in the loading screen, load (doh) almost simultaneously.
> When the plugin kicks in all icons load as before (fast) - but it stops (for a long time) when loading (what i assume it is) the plasma desktop (the icon before the enormous K)...
>
> Is there some Qt way to do some kind of profiling in KDE?
>
> makis marimpis wrote:
> If the DBus slowness thing, is related to Plasma, should i wait until it is fixed somehow to the next point release?
> Or, the "modifying SharedInfo" answer could also be accepted (as long as it is compatible with the master branch)?
This plugin is loaded in EventProcessor's constructor, which is called from ActivityManager's constructor, so we have a chicken and egg problem here that may be the cause of the delay. This plugin tries to contact ActivityManager through dbus to list the current list of activities but ActivityManager loads the list from disk after allocating the EventProcessor object. You can try adding a slot GlobalShortcutsPlugin::realInit() containg everything that is in GlobalShortcutsPlugin::init() today and call it from GlobalShortcutsPlugin::init() using "QTimer::singleShot(1000, this, SLOT(realInit()));". That will make sure ActivityManager is already allocated when the plugin is initialized.
- Lamarque Vieira
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104428/#review12169
-----------------------------------------------------------
On April 4, 2012, 6:56 a.m., makis marimpis wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104428/
> -----------------------------------------------------------
>
> (Updated April 4, 2012, 6:56 a.m.)
>
>
> Review request for KDE Base Apps, KDE Runtime, Plasma, and Ivan Čukić.
>
>
> Description
> -------
>
> (follows discarded review: 104391)
>
> The plugin adds global keyboard shortcuts for changing the activity.
> Defaults start from Qt::MetaModifier + Qt::Key_F1.
>
> Initially, this functionality was implemented (without correct results) using KActitivities::Controller.
> Using DBus seems fine, just that... it forces kamd to start with 3-4 seconds delay - so it really needs modification/and i would like more guidance related to dbus :D.
> Other than that, feedback is needed.
>
>
> This addresses bugs 265069 and 273467.
> http://bugs.kde.org/show_bug.cgi?id=265069
> http://bugs.kde.org/show_bug.cgi?id=273467
>
>
> Diffs
> -----
>
> service/plugins/CMakeLists.txt 3e965c0a201a7eee2c9868fcf163cf55af636858
> service/plugins/globalshortcuts/CMakeLists.txt PRE-CREATION
> service/plugins/globalshortcuts/activitymanager-plugin-globalshortcuts.desktop PRE-CREATION
> service/plugins/globalshortcuts/globalshortcuts.h PRE-CREATION
> service/plugins/globalshortcuts/globalshortcuts.cpp PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/104428/diff/
>
>
> Testing
> -------
>
> Logged in.
> Used the default shortcuts to switch activities.
> It works!
>
>
> Thanks,
>
> makis marimpis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120410/738f3351/attachment-0001.html>
More information about the Plasma-devel
mailing list